<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

\section[Id]{@Ids@: Value and constructor identifiers}
-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- #name_types#</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- GHC uses several kinds of name internally:</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- * 'GHC.Types.Name.Occurrence.OccName': see &quot;GHC.Types.Name.Occurrence#name_types&quot;</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- * 'GHC.Types.Name.Reader.RdrName': see &quot;GHC.Types.Name.Reader#name_types&quot;</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- * 'GHC.Types.Name.Name': see &quot;GHC.Types.Name#name_types&quot;</span><span>
</span><span id="line-19"></span><span class="hs-comment">--</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- * 'GHC.Types.Id.Id' represents names that not only have a 'GHC.Types.Name.Name' but also a</span><span>
</span><span id="line-21"></span><span class="hs-comment">--   'GHC.Core.TyCo.Rep.Type' and some additional details (a 'GHC.Types.Id.Info.IdInfo' and</span><span>
</span><span id="line-22"></span><span class="hs-comment">--   one of LocalIdDetails or GlobalIdDetails) that are added,</span><span>
</span><span id="line-23"></span><span class="hs-comment">--   modified and inspected by various compiler passes. These 'GHC.Types.Var.Var' names</span><span>
</span><span id="line-24"></span><span class="hs-comment">--   may either be global or local, see &quot;GHC.Types.Var#globalvslocal&quot;</span><span>
</span><span id="line-25"></span><span class="hs-comment">--</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- * 'GHC.Types.Var.Var': see &quot;GHC.Types.Var#name_types&quot;</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.Id</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><span class="hs-comment">-- * The main types</span></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier">Var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isId"><span class="hs-identifier">isId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><span class="hs-comment">-- * In and Out variants</span></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#InVar"><span class="hs-identifier">InVar</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><a href="GHC.Types.Var.html#InId"><span class="hs-identifier">InId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#OutVar"><span class="hs-identifier">OutVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#OutId"><span class="hs-identifier">OutId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Simple construction</span></span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier">mkGlobalId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkVanillaGlobal"><span class="hs-identifier">mkVanillaGlobal</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkVanillaGlobalWithInfo"><span class="hs-identifier">mkVanillaGlobalWithInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier">mkLocalId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkLocalCoVar"><span class="hs-identifier">mkLocalCoVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkLocalIdOrCoVar"><span class="hs-identifier">mkLocalIdOrCoVar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkLocalIdWithInfo"><span class="hs-identifier">mkLocalIdWithInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkExportedLocalId"><span class="hs-identifier">mkExportedLocalId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkExportedVanillaId"><span class="hs-identifier">mkExportedVanillaId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier">mkSysLocal</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalM"><span class="hs-identifier">mkSysLocalM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier">mkSysLocalOrCoVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalOrCoVarM"><span class="hs-identifier">mkSysLocalOrCoVarM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkUserLocal"><span class="hs-identifier">mkUserLocal</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkUserLocalOrCoVar"><span class="hs-identifier">mkUserLocalOrCoVar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkTemplateLocals"><span class="hs-identifier">mkTemplateLocals</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkTemplateLocalsNum"><span class="hs-identifier">mkTemplateLocalsNum</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#mkTemplateLocal"><span class="hs-identifier">mkTemplateLocal</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkScaledTemplateLocal"><span class="hs-identifier">mkScaledTemplateLocal</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#mkWorkerId"><span class="hs-identifier">mkWorkerId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Taking an Id apart</span></span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idName"><span class="hs-identifier">idName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idType"><span class="hs-identifier">idType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier">idMult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idScaledType"><span class="hs-identifier">idScaledType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idUnique"><span class="hs-identifier">idUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier">idInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier">idDetails</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#recordSelectorTyCon"><span class="hs-identifier">recordSelectorTyCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Modifying an Id</span></span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdName"><span class="hs-identifier">setIdName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setIdUnique"><span class="hs-identifier">setIdUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setIdType"><span class="hs-identifier">GHC.Types.Id.setIdType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#setIdMult"><span class="hs-identifier">setIdMult</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#updateIdTypeButNotMult"><span class="hs-identifier">updateIdTypeButNotMult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#updateIdTypeAndMult"><span class="hs-identifier">updateIdTypeAndMult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#updateIdTypeAndMultM"><span class="hs-identifier">updateIdTypeAndMultM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdExported"><span class="hs-identifier">setIdExported</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setIdNotExported"><span class="hs-identifier">setIdNotExported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#globaliseId"><span class="hs-identifier">globaliseId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#localiseId"><span class="hs-identifier">localiseId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdInfo"><span class="hs-identifier">setIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#lazySetIdInfo"><span class="hs-identifier">lazySetIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier">modifyIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#maybeModifyIdInfo"><span class="hs-identifier">maybeModifyIdInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#zapLamIdInfo"><span class="hs-identifier">zapLamIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapIdDemandInfo"><span class="hs-identifier">zapIdDemandInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapIdUsageInfo"><span class="hs-identifier">zapIdUsageInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapIdUsageEnvInfo"><span class="hs-identifier">zapIdUsageEnvInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#zapIdUsedOnceInfo"><span class="hs-identifier">zapIdUsedOnceInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapIdTailCallInfo"><span class="hs-identifier">zapIdTailCallInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#zapFragileIdInfo"><span class="hs-identifier">zapFragileIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapIdStrictness"><span class="hs-identifier">zapIdStrictness</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapStableUnfolding"><span class="hs-identifier">zapStableUnfolding</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#transferPolyIdInfo"><span class="hs-identifier">transferPolyIdInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#scaleIdBy"><span class="hs-identifier">scaleIdBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#scaleVarBy"><span class="hs-identifier">scaleVarBy</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Predicates on Ids</span></span><span>
</span><span id="line-62"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isImplicitId"><span class="hs-identifier">isImplicitId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isDeadBinder"><span class="hs-identifier">isDeadBinder</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isStrictId"><span class="hs-identifier">isStrictId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#isExportedId"><span class="hs-identifier">isExportedId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier">isLocalId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isGlobalId"><span class="hs-identifier">isGlobalId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isRecordSelector"><span class="hs-identifier">isRecordSelector</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isNaughtyRecordSelector"><span class="hs-identifier">isNaughtyRecordSelector</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isPatSynRecordSelector"><span class="hs-identifier">isPatSynRecordSelector</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-67"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isDataConRecordSelector"><span class="hs-identifier">isDataConRecordSelector</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-68"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isClassOpId_maybe"><span class="hs-identifier">isClassOpId_maybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isDFunId"><span class="hs-identifier">isDFunId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isPrimOpId"><span class="hs-identifier">isPrimOpId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isPrimOpId_maybe"><span class="hs-identifier">isPrimOpId_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isFCallId"><span class="hs-identifier">isFCallId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isFCallId_maybe"><span class="hs-identifier">isFCallId_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isDataConWorkId"><span class="hs-identifier">isDataConWorkId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isDataConWorkId_maybe"><span class="hs-identifier">isDataConWorkId_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-72"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isDataConWrapId"><span class="hs-identifier">isDataConWrapId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isDataConWrapId_maybe"><span class="hs-identifier">isDataConWrapId_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-73"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isDataConId_maybe"><span class="hs-identifier">isDataConId_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-74"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idDataCon"><span class="hs-identifier">idDataCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-75"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isConLikeId"><span class="hs-identifier">isConLikeId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isDeadEndId"><span class="hs-identifier">isDeadEndId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idIsFrom"><span class="hs-identifier">idIsFrom</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-76"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#hasNoBinding"><span class="hs-identifier">hasNoBinding</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Join variables</span></span><span>
</span><span id="line-79"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.html#JoinId"><span class="hs-identifier">JoinId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier">isJoinId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isJoinId_maybe"><span class="hs-identifier">isJoinId_maybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idJoinArity"><span class="hs-identifier">idJoinArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-80"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#asJoinId"><span class="hs-identifier">asJoinId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#asJoinId_maybe"><span class="hs-identifier">asJoinId_maybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapJoinId"><span class="hs-identifier">zapJoinId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Inline pragma stuff</span></span><span>
</span><span id="line-83"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idInlinePragma"><span class="hs-identifier">idInlinePragma</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setInlinePragma"><span class="hs-identifier">setInlinePragma</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#modifyInlinePragma"><span class="hs-identifier">modifyInlinePragma</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-84"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idInlineActivation"><span class="hs-identifier">idInlineActivation</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setInlineActivation"><span class="hs-identifier">setInlineActivation</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idRuleMatchInfo"><span class="hs-identifier">idRuleMatchInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** One-shot lambdas</span></span><span>
</span><span id="line-87"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isOneShotBndr"><span class="hs-identifier">isOneShotBndr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isProbablyOneShotLambda"><span class="hs-identifier">isProbablyOneShotLambda</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-88"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setOneShotLambda"><span class="hs-identifier">setOneShotLambda</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#clearOneShotLambda"><span class="hs-identifier">clearOneShotLambda</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-89"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#updOneShotInfo"><span class="hs-identifier">updOneShotInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setIdOneShotInfo"><span class="hs-identifier">setIdOneShotInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-90"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isStateHackType"><span class="hs-identifier">isStateHackType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#stateHackOneShot"><span class="hs-identifier">stateHackOneShot</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#typeOneShot"><span class="hs-identifier">typeOneShot</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Reading 'IdInfo' fields</span></span><span>
</span><span id="line-93"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idArity"><span class="hs-identifier">idArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-94"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idCallArity"><span class="hs-identifier">idCallArity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idFunRepArity"><span class="hs-identifier">idFunRepArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-95"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idUnfolding"><span class="hs-identifier">idUnfolding</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#realIdUnfolding"><span class="hs-identifier">realIdUnfolding</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-96"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idSpecialisation"><span class="hs-identifier">idSpecialisation</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idCoreRules"><span class="hs-identifier">idCoreRules</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idHasRules"><span class="hs-identifier">idHasRules</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier">idCafInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idLFInfo_maybe"><span class="hs-identifier">idLFInfo_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-98"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idOneShotInfo"><span class="hs-identifier">idOneShotInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idStateHackOneShotInfo"><span class="hs-identifier">idStateHackOneShotInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-99"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idOccInfo"><span class="hs-identifier">idOccInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-100"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#isNeverLevPolyId"><span class="hs-identifier">isNeverLevPolyId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Writing 'IdInfo' fields</span></span><span>
</span><span id="line-103"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdUnfolding"><span class="hs-identifier">setIdUnfolding</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setCaseBndrEvald"><span class="hs-identifier">setCaseBndrEvald</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-104"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdArity"><span class="hs-identifier">setIdArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-105"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdCallArity"><span class="hs-identifier">setIdCallArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdSpecialisation"><span class="hs-identifier">setIdSpecialisation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdCafInfo"><span class="hs-identifier">setIdCafInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-109"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdOccInfo"><span class="hs-identifier">setIdOccInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#zapIdOccInfo"><span class="hs-identifier">zapIdOccInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-110"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdLFInfo"><span class="hs-identifier">setIdLFInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdDemandInfo"><span class="hs-identifier">setIdDemandInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-113"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdStrictness"><span class="hs-identifier">setIdStrictness</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-114"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#setIdCprInfo"><span class="hs-identifier">setIdCprInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idDemandInfo"><span class="hs-identifier">idDemandInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-117"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idStrictness"><span class="hs-identifier">idStrictness</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-118"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.html#idCprInfo"><span class="hs-identifier">idCprInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-124"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-127"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier">CoreRule</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#isStableUnfolding"><span class="hs-identifier">isStableUnfolding</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#evaldUnfolding"><span class="hs-identifier">evaldUnfolding</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-128"></span><span>                 </span><span class="annot"><a href="GHC.Core.html#isCompulsoryUnfolding"><span class="hs-identifier">isCompulsoryUnfolding</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#Unfolding"><span class="hs-identifier">Unfolding</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.html#NoUnfolding"><span class="hs-identifier">NoUnfolding</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html"><span class="hs-identifier">GHC.Types.Id.Info</span></a></span><span>
</span><span id="line-131"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-comment">-- Imported and re-exported</span><span>
</span><span id="line-134"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#CoVar"><span class="hs-identifier">CoVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#JoinId"><span class="hs-identifier">JoinId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-135"></span><span>            </span><span class="annot"><a href="GHC.Types.Var.html#InId"><span class="hs-identifier">InId</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><a href="GHC.Types.Var.html#InVar"><span class="hs-identifier">InVar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-136"></span><span>            </span><span class="annot"><a href="GHC.Types.Var.html#OutId"><span class="hs-identifier">OutId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#OutVar"><span class="hs-identifier">OutVar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-137"></span><span>            </span><span class="annot"><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier">idInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier">idDetails</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#setIdDetails"><span class="hs-identifier">setIdDetails</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#globaliseId"><span class="hs-identifier">globaliseId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-138"></span><span>            </span><span class="annot"><a href="GHC.Types.Var.html#isId"><span class="hs-identifier">isId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isLocalId"><span class="hs-identifier">isLocalId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isGlobalId"><span class="hs-identifier">isGlobalId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#isExportedId"><span class="hs-identifier">isExportedId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-139"></span><span>            </span><span class="annot"><a href="GHC.Types.Var.html#setIdMult"><span class="hs-identifier">setIdMult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#updateIdTypeAndMult"><span class="hs-identifier">updateIdTypeAndMult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#updateIdTypeButNotMult"><span class="hs-identifier">updateIdTypeButNotMult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#updateIdTypeAndMultM"><span class="hs-identifier">updateIdTypeAndMultM</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Var</span></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-143"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.RepType.html"><span class="hs-identifier">GHC.Types.RepType</span></a></span><span>
</span><span id="line-144"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html"><span class="hs-identifier">GHC.Builtin.Types.Prim</span></a></span><span>
</span><span id="line-145"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-146"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Demand.html"><span class="hs-identifier">GHC.Types.Demand</span></a></span><span>
</span><span id="line-147"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Cpr.html"><span class="hs-identifier">GHC.Types.Cpr</span></a></span><span>
</span><span id="line-148"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-149"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-150"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Class.html"><span class="hs-identifier">GHC.Core.Class</span></a></span><span>
</span><span id="line-151"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html"><span class="hs-identifier">GHC.Builtin.PrimOps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Builtin.PrimOps.html#PrimOp"><span class="hs-identifier">PrimOp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.ForeignCall.html"><span class="hs-identifier">GHC.Types.ForeignCall</span></a></span><span>
</span><span id="line-153"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-154"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-155"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-156"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-157"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-158"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-159"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-160"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span class="hs-comment">-- infixl so you can say (id `set` a `set` b)</span><span>
</span><span id="line-163"></span><span class="hs-keyword">infixl</span><span>  </span><span class="hs-number">1</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#setIdUnfolding"><span class="hs-operator hs-type">`setIdUnfolding`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-164"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdArity"><span class="hs-operator hs-type">`setIdArity`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-165"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdCallArity"><span class="hs-operator hs-type">`setIdCallArity`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-166"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdOccInfo"><span class="hs-operator hs-type">`setIdOccInfo`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-167"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdOneShotInfo"><span class="hs-operator hs-type">`setIdOneShotInfo`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdSpecialisation"><span class="hs-operator hs-type">`setIdSpecialisation`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-170"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setInlinePragma"><span class="hs-operator hs-type">`setInlinePragma`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-171"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setInlineActivation"><span class="hs-operator hs-type">`setInlineActivation`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-172"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-operator hs-type">`idCafInfo`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdDemandInfo"><span class="hs-operator hs-type">`setIdDemandInfo`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-175"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdStrictness"><span class="hs-operator hs-type">`setIdStrictness`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-176"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#setIdCprInfo"><span class="hs-operator hs-type">`setIdCprInfo`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#asJoinId"><span class="hs-operator hs-type">`asJoinId`</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-179"></span><span>          </span><span class="annot"><a href="GHC.Types.Id.html#asJoinId_maybe"><span class="hs-operator hs-type">`asJoinId_maybe`</span></a></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Basic Id manipulation}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span class="annot"><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-type">idName</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-190"></span><span id="idName"><span class="annot"><span class="annottext">idName :: Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var hs-var">idName</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Var.html#varName"><span class="hs-identifier hs-var hs-var">Var.varName</span></a></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="annot"><a href="GHC.Types.Id.html#idUnique"><span class="hs-identifier hs-type">idUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-193"></span><span id="idUnique"><span class="annot"><span class="annottext">idUnique :: Id -&gt; Unique
</span><a href="GHC.Types.Id.html#idUnique"><span class="hs-identifier hs-var hs-var">idUnique</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Unique
</span><a href="GHC.Types.Var.html#varUnique"><span class="hs-identifier hs-var">Var.varUnique</span></a></span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="annot"><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-type">idType</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Kind"><span class="hs-identifier hs-type">Kind</span></a></span><span>
</span><span id="line-196"></span><span id="idType"><span class="annot"><span class="annottext">idType :: Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var hs-var">idType</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Var.html#varType"><span class="hs-identifier hs-var hs-var">Var.varType</span></a></span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="annot"><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-type">idMult</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span>
</span><span id="line-199"></span><span id="idMult"><span class="annot"><span class="annottext">idMult :: Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-var hs-var">idMult</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Var.html#varMult"><span class="hs-identifier hs-var hs-var">Var.varMult</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="annot"><a href="GHC.Types.Id.html#idScaledType"><span class="hs-identifier hs-type">idScaledType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-202"></span><span id="idScaledType"><span class="annot"><span class="annottext">idScaledType :: Id -&gt; Scaled Kind
</span><a href="GHC.Types.Id.html#idScaledType"><span class="hs-identifier hs-var hs-var">idScaledType</span></a></span></span><span> </span><span id="local-6989586621680835978"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835978"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Kind -&gt; Scaled Kind
forall a. Kind -&gt; a -&gt; Scaled a
</span><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-var">Scaled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-var">idMult</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835978"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835978"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.Types.Id.html#scaleIdBy"><span class="hs-identifier hs-type">scaleIdBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-205"></span><span id="scaleIdBy"><span class="annot"><span class="annottext">scaleIdBy :: Kind -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#scaleIdBy"><span class="hs-identifier hs-var hs-var">scaleIdBy</span></a></span></span><span> </span><span id="local-6989586621680835976"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835976"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680835975"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835975"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Var.html#setIdMult"><span class="hs-identifier hs-var">setIdMult</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835975"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835976"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Kind -&gt; Kind
</span><a href="GHC.Core.Multiplicity.html#mkMultMul"><span class="hs-operator hs-var">`mkMultMul`</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-var">idMult</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835975"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-comment">-- | Like 'scaleIdBy', but skips non-Ids. Useful for scaling</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- a mixed list of ids and tyvars.</span><span>
</span><span id="line-209"></span><span class="annot"><a href="GHC.Types.Id.html#scaleVarBy"><span class="hs-identifier hs-type">scaleVarBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-210"></span><span id="scaleVarBy"><span class="annot"><span class="annottext">scaleVarBy :: Kind -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#scaleVarBy"><span class="hs-identifier hs-var hs-var">scaleVarBy</span></a></span></span><span> </span><span id="local-6989586621680835973"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835973"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680835972"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835972"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-211"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835972"><span class="hs-identifier hs-var">id</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#scaleIdBy"><span class="hs-identifier hs-var">scaleIdBy</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835973"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835972"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-212"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835972"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="annot"><a href="GHC.Types.Id.html#setIdName"><span class="hs-identifier hs-type">setIdName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-215"></span><span id="setIdName"><span class="annot"><span class="annottext">setIdName :: Id -&gt; Name -&gt; Id
</span><a href="GHC.Types.Id.html#setIdName"><span class="hs-identifier hs-var hs-var">setIdName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name -&gt; Id
</span><a href="GHC.Types.Var.html#setVarName"><span class="hs-identifier hs-var">Var.setVarName</span></a></span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span class="annot"><a href="GHC.Types.Id.html#setIdUnique"><span class="hs-identifier hs-type">setIdUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-218"></span><span id="setIdUnique"><span class="annot"><span class="annottext">setIdUnique :: Id -&gt; Unique -&gt; Id
</span><a href="GHC.Types.Id.html#setIdUnique"><span class="hs-identifier hs-var hs-var">setIdUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Unique -&gt; Id
</span><a href="GHC.Types.Var.html#setVarUnique"><span class="hs-identifier hs-var">Var.setVarUnique</span></a></span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-comment">-- | Not only does this set the 'Id' 'Type', it also evaluates the type to try and</span><span>
</span><span id="line-221"></span><span class="hs-comment">-- reduce space usage</span><span>
</span><span id="line-222"></span><span class="annot"><a href="GHC.Types.Id.html#setIdType"><span class="hs-identifier hs-type">setIdType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-223"></span><span id="setIdType"><span class="annot"><span class="annottext">setIdType :: Id -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#setIdType"><span class="hs-identifier hs-var hs-var">setIdType</span></a></span></span><span> </span><span id="local-6989586621680835969"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835969"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835968"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835968"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; ()
</span><a href="GHC.Core.Type.html#seqType"><span class="hs-identifier hs-var">seqType</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835968"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; Id -&gt; Id
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Var.html#setVarType"><span class="hs-identifier hs-var">Var.setVarType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835969"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835968"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="annot"><a href="GHC.Types.Id.html#setIdExported"><span class="hs-identifier hs-type">setIdExported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-226"></span><span id="setIdExported"><span class="annot"><span class="annottext">setIdExported :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#setIdExported"><span class="hs-identifier hs-var hs-var">setIdExported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id
</span><a href="GHC.Types.Var.html#setIdExported"><span class="hs-identifier hs-var">Var.setIdExported</span></a></span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span class="annot"><a href="GHC.Types.Id.html#setIdNotExported"><span class="hs-identifier hs-type">setIdNotExported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-229"></span><span id="setIdNotExported"><span class="annot"><span class="annottext">setIdNotExported :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#setIdNotExported"><span class="hs-identifier hs-var hs-var">setIdNotExported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id
</span><a href="GHC.Types.Var.html#setIdNotExported"><span class="hs-identifier hs-var">Var.setIdNotExported</span></a></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="annot"><a href="GHC.Types.Id.html#localiseId"><span class="hs-identifier hs-type">localiseId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- Make an Id with the same unique and type as the</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- incoming Id, but with an *Internal* Name and *LocalId* flavour</span><span>
</span><span id="line-234"></span><span id="localiseId"><span class="annot"><span class="annottext">localiseId :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#localiseId"><span class="hs-identifier hs-var hs-var">localiseId</span></a></span></span><span> </span><span id="local-6989586621680835963"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-235"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isId</span><span> </span><span class="hs-identifier">id</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">isLocalId</span><span> </span><span class="hs-identifier">id</span><span> </span><span class="hs-operator">&amp;&amp;</span><span> </span><span class="hs-identifier">isInternalName</span><span> </span><span class="hs-identifier">name</span><span>
</span><span id="line-236"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-237"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-238"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkLocalVar"><span class="hs-identifier hs-var">Var.mkLocalVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Name
</span><a href="GHC.Types.Name.html#localiseName"><span class="hs-identifier hs-var">localiseName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835957"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Var.html#varMult"><span class="hs-identifier hs-var hs-var">Var.varMult</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-240"></span><span>    </span><span id="local-6989586621680835957"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680835957"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835963"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="annot"><a href="GHC.Types.Id.html#lazySetIdInfo"><span class="hs-identifier hs-type">lazySetIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-243"></span><span id="lazySetIdInfo"><span class="annot"><span class="annottext">lazySetIdInfo :: Id -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#lazySetIdInfo"><span class="hs-identifier hs-var hs-var">lazySetIdInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#lazySetIdInfo"><span class="hs-identifier hs-var">Var.lazySetIdInfo</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.Types.Id.html#setIdInfo"><span class="hs-identifier hs-type">setIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-246"></span><span id="setIdInfo"><span class="annot"><span class="annottext">setIdInfo :: Id -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdInfo"><span class="hs-identifier hs-var hs-var">setIdInfo</span></a></span></span><span> </span><span id="local-6989586621680835953"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835953"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835952"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835952"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835952"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Id -&gt; Id
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#lazySetIdInfo"><span class="hs-identifier hs-var">lazySetIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835953"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835952"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">-- Try to avoid space leaks by seq'ing</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="annot"><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-type">modifyIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#HasDebugCallStack"><span class="hs-identifier hs-type">HasDebugCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-250"></span><span id="modifyIdInfo"><span class="annot"><span class="annottext">modifyIdInfo :: HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var hs-var">modifyIdInfo</span></a></span></span><span> </span><span id="local-6989586621680835949"><span class="annot"><span class="annottext">IdInfo -&gt; IdInfo
</span><a href="#local-6989586621680835949"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span id="local-6989586621680835948"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835948"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdInfo"><span class="hs-identifier hs-var">setIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835948"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; IdInfo
</span><a href="#local-6989586621680835949"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835948"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">-- maybeModifyIdInfo tries to avoid unnecessary thrashing</span><span>
</span><span id="line-253"></span><span class="annot"><a href="GHC.Types.Id.html#maybeModifyIdInfo"><span class="hs-identifier hs-type">maybeModifyIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-254"></span><span id="maybeModifyIdInfo"><span class="annot"><span class="annottext">maybeModifyIdInfo :: Maybe IdInfo -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#maybeModifyIdInfo"><span class="hs-identifier hs-var hs-var">maybeModifyIdInfo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680835947"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835947"><span class="hs-identifier hs-var">new_info</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680835946"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835946"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#lazySetIdInfo"><span class="hs-identifier hs-var">lazySetIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835946"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835947"><span class="hs-identifier hs-var">new_info</span></a></span><span>
</span><span id="line-255"></span><span class="annot"><a href="GHC.Types.Id.html#maybeModifyIdInfo"><span class="hs-identifier hs-var">maybeModifyIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe IdInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>         </span><span id="local-6989586621680835945"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835945"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835945"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Simple Id construction}
*                                                                      *
************************************************************************

Absolutely all Ids are made by mkId.  It is just like Var.mkId,
but in addition it pins free-tyvar-info onto the Id's type,
where it can easily be found.

Note [Free type variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~
At one time we cached the free type variables of the type of an Id
at the root of the type in a TyNote.  The idea was to avoid repeating
the free-type-variable calculation.  But it turned out to slow down
the compiler overall. I don't quite know why; perhaps finding free
type variables of an Id isn't all that common whereas applying a
substitution (which changes the free type variables) is more common.
Anyway, we removed it in March 2008.
-}</span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="hs-comment">-- | For an explanation of global vs. local 'Id's, see &quot;GHC.Types.Var.Var#globalvslocal&quot;</span><span>
</span><span id="line-280"></span><span class="annot"><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-type">mkGlobalId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdDetails"><span class="hs-identifier hs-type">IdDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-281"></span><span id="mkGlobalId"><span class="annot"><span class="annottext">mkGlobalId :: IdDetails -&gt; Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var hs-var">mkGlobalId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkGlobalVar"><span class="hs-identifier hs-var">Var.mkGlobalVar</span></a></span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span class="hs-comment">-- | Make a global 'Id' without any extra information at all</span><span>
</span><span id="line-284"></span><span class="annot"><a href="GHC.Types.Id.html#mkVanillaGlobal"><span class="hs-identifier hs-type">mkVanillaGlobal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-285"></span><span id="mkVanillaGlobal"><span class="annot"><span class="annottext">mkVanillaGlobal :: Name -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkVanillaGlobal"><span class="hs-identifier hs-var hs-var">mkVanillaGlobal</span></a></span></span><span> </span><span id="local-6989586621680835943"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835943"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835942"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835942"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#mkVanillaGlobalWithInfo"><span class="hs-identifier hs-var">mkVanillaGlobalWithInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835943"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835942"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier hs-var">vanillaIdInfo</span></a></span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="hs-comment">-- | Make a global 'Id' with no global information but some generic 'IdInfo'</span><span>
</span><span id="line-288"></span><span class="annot"><a href="GHC.Types.Id.html#mkVanillaGlobalWithInfo"><span class="hs-identifier hs-type">mkVanillaGlobalWithInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-289"></span><span id="mkVanillaGlobalWithInfo"><span class="annot"><span class="annottext">mkVanillaGlobalWithInfo :: Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#mkVanillaGlobalWithInfo"><span class="hs-identifier hs-var hs-var">mkVanillaGlobalWithInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="GHC.Types.Id.Info.html#VanillaId"><span class="hs-identifier hs-var">VanillaId</span></a></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="hs-comment">-- | For an explanation of global vs. local 'Id's, see &quot;GHC.Types.Var#globalvslocal&quot;</span><span>
</span><span id="line-293"></span><span class="annot"><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier hs-type">mkLocalId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#HasDebugCallStack"><span class="hs-identifier hs-type">HasDebugCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-294"></span><span id="mkLocalId"><span class="annot"><span class="annottext">mkLocalId :: HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier hs-var hs-var">mkLocalId</span></a></span></span><span> </span><span id="local-6989586621680835937"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835937"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835936"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835936"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835935"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835935"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isCoVarType</span><span> </span><span class="hs-identifier">ty</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-295"></span><span>                      </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; IdInfo -&gt; Id
Name -&gt; Kind -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalIdWithInfo"><span class="hs-identifier hs-var">mkLocalIdWithInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835937"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835936"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835935"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier hs-var">vanillaIdInfo</span></a></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="hs-comment">-- | Make a local CoVar</span><span>
</span><span id="line-298"></span><span class="annot"><a href="GHC.Types.Id.html#mkLocalCoVar"><span class="hs-identifier hs-type">mkLocalCoVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#CoVar"><span class="hs-identifier hs-type">CoVar</span></a></span><span>
</span><span id="line-299"></span><span id="mkLocalCoVar"><span class="annot"><span class="annottext">mkLocalCoVar :: Name -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalCoVar"><span class="hs-identifier hs-var hs-var">mkLocalCoVar</span></a></span></span><span> </span><span id="local-6989586621680835933"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835933"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835932"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835932"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-300"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isCoVarType</span><span> </span><span class="hs-identifier">ty</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>    </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkLocalVar"><span class="hs-identifier hs-var">Var.mkLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="GHC.Types.Id.Info.html#CoVarId"><span class="hs-identifier hs-var">CoVarId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835933"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835932"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier hs-var">vanillaIdInfo</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">-- | Like 'mkLocalId', but checks the type to see if it should make a covar</span><span>
</span><span id="line-304"></span><span class="annot"><a href="GHC.Types.Id.html#mkLocalIdOrCoVar"><span class="hs-identifier hs-type">mkLocalIdOrCoVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-305"></span><span id="mkLocalIdOrCoVar"><span class="annot"><span class="annottext">mkLocalIdOrCoVar :: Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalIdOrCoVar"><span class="hs-identifier hs-var hs-var">mkLocalIdOrCoVar</span></a></span></span><span> </span><span id="local-6989586621680835929"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835929"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835928"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835928"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835927"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835927"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-comment">-- We should ASSERT(eqType w Many) in the isCoVarType case.</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-comment">-- However, currently this assertion does not hold.</span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-comment">-- In tests with -fdefer-type-errors, such as T14584a,</span><span>
</span><span id="line-309"></span><span>  </span><span class="hs-comment">-- we create a linear 'case' where the scrutinee is a coercion</span><span>
</span><span id="line-310"></span><span>  </span><span class="hs-comment">-- (see castBottomExpr). This problem is covered by #17291.</span><span>
</span><span id="line-311"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Bool
</span><a href="GHC.Core.Type.html#isCoVarType"><span class="hs-identifier hs-var">isCoVarType</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835927"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalCoVar"><span class="hs-identifier hs-var">mkLocalCoVar</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835929"><span class="hs-identifier hs-var">name</span></a></span><span>   </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835927"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-312"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; Id
Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier hs-var">mkLocalId</span></a></span><span>    </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835929"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835928"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835927"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span>    </span><span class="hs-comment">-- proper ids only; no covars!</span><span>
</span><span id="line-315"></span><span class="annot"><a href="GHC.Types.Id.html#mkLocalIdWithInfo"><span class="hs-identifier hs-type">mkLocalIdWithInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#HasDebugCallStack"><span class="hs-identifier hs-type">HasDebugCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-316"></span><span id="mkLocalIdWithInfo"><span class="annot"><span class="annottext">mkLocalIdWithInfo :: HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalIdWithInfo"><span class="hs-identifier hs-var hs-var">mkLocalIdWithInfo</span></a></span></span><span> </span><span id="local-6989586621680835925"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835925"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835924"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835924"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835923"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835923"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680835922"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835922"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isCoVarType</span><span> </span><span class="hs-identifier">ty</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-317"></span><span>                                   </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkLocalVar"><span class="hs-identifier hs-var">Var.mkLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="GHC.Types.Id.Info.html#VanillaId"><span class="hs-identifier hs-var">VanillaId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835925"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835924"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835923"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835922"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-318"></span><span>        </span><span class="hs-comment">-- Note [Free type variables]</span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span class="hs-comment">-- | Create a local 'Id' that is marked as exported.</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- This prevents things attached to it from being removed as dead code.</span><span>
</span><span id="line-322"></span><span class="hs-comment">-- See Note [Exported LocalIds]</span><span>
</span><span id="line-323"></span><span class="annot"><a href="GHC.Types.Id.html#mkExportedLocalId"><span class="hs-identifier hs-type">mkExportedLocalId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdDetails"><span class="hs-identifier hs-type">IdDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-324"></span><span id="mkExportedLocalId"><span class="annot"><span class="annottext">mkExportedLocalId :: IdDetails -&gt; Name -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkExportedLocalId"><span class="hs-identifier hs-var hs-var">mkExportedLocalId</span></a></span></span><span> </span><span id="local-6989586621680835921"><span class="annot"><span class="annottext">IdDetails
</span><a href="#local-6989586621680835921"><span class="hs-identifier hs-var">details</span></a></span></span><span> </span><span id="local-6989586621680835920"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835920"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835919"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835919"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkExportedLocalVar"><span class="hs-identifier hs-var">Var.mkExportedLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="#local-6989586621680835921"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835920"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835919"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier hs-var">vanillaIdInfo</span></a></span><span>
</span><span id="line-325"></span><span>        </span><span class="hs-comment">-- Note [Free type variables]</span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Types.Id.html#mkExportedVanillaId"><span class="hs-identifier hs-type">mkExportedVanillaId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-328"></span><span id="mkExportedVanillaId"><span class="annot"><span class="annottext">mkExportedVanillaId :: Name -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkExportedVanillaId"><span class="hs-identifier hs-var hs-var">mkExportedVanillaId</span></a></span></span><span> </span><span id="local-6989586621680835917"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835917"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680835916"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835916"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Kind -&gt; IdInfo -&gt; Id
</span><a href="GHC.Types.Var.html#mkExportedLocalVar"><span class="hs-identifier hs-var">Var.mkExportedLocalVar</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="GHC.Types.Id.Info.html#VanillaId"><span class="hs-identifier hs-var">VanillaId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680835917"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835916"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#vanillaIdInfo"><span class="hs-identifier hs-var">vanillaIdInfo</span></a></span><span>
</span><span id="line-329"></span><span>        </span><span class="hs-comment">-- Note [Free type variables]</span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span>
</span><span id="line-332"></span><span class="hs-comment">-- | Create a system local 'Id'. These are local 'Id's (see &quot;Var#globalvslocal&quot;)</span><span>
</span><span id="line-333"></span><span class="hs-comment">-- that are created by the compiler out of thin air</span><span>
</span><span id="line-334"></span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier hs-type">mkSysLocal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-335"></span><span id="mkSysLocal"><span class="annot"><span class="annottext">mkSysLocal :: FastString -&gt; Unique -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier hs-var hs-var">mkSysLocal</span></a></span></span><span> </span><span id="local-6989586621680835915"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835915"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680835914"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835914"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680835913"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835913"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835912"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835912"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isCoVarType</span><span> </span><span class="hs-identifier">ty</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>                        </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; Id
Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier hs-var">mkLocalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; FastString -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier hs-var">mkSystemVarName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835914"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835915"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835913"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835912"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="hs-comment">-- | Like 'mkSysLocal', but checks to see if we have a covar type</span><span>
</span><span id="line-339"></span><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier hs-type">mkSysLocalOrCoVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-340"></span><span id="mkSysLocalOrCoVar"><span class="annot"><span class="annottext">mkSysLocalOrCoVar :: FastString -&gt; Unique -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier hs-var hs-var">mkSysLocalOrCoVar</span></a></span></span><span> </span><span id="local-6989586621680835910"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835910"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680835909"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835909"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680835908"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835908"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835907"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835907"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-341"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalIdOrCoVar"><span class="hs-identifier hs-var">mkLocalIdOrCoVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; FastString -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier hs-var">mkSystemVarName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835909"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835910"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835908"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835907"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span id="local-6989586621680836251"><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalM"><span class="hs-identifier hs-type">mkSysLocalM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#MonadUnique"><span class="hs-identifier hs-type">MonadUnique</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680836251"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680836251"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span></span><span>
</span><span id="line-344"></span><span id="mkSysLocalM"><span class="annot"><span class="annottext">mkSysLocalM :: forall (m :: * -&gt; *).
MonadUnique m =&gt;
FastString -&gt; Kind -&gt; Kind -&gt; m Id
</span><a href="GHC.Types.Id.html#mkSysLocalM"><span class="hs-identifier hs-var hs-var">mkSysLocalM</span></a></span></span><span> </span><span id="local-6989586621680835900"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835900"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680835899"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835899"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835898"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835898"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m Unique
forall (m :: * -&gt; *). MonadUnique m =&gt; m Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var">getUniqueM</span></a></span><span> </span><span class="annot"><span class="annottext">m Unique -&gt; (Unique -&gt; m Id) -&gt; m Id
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680835896"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835896"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; m Id
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Unique -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier hs-var">mkSysLocal</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835900"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835896"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835899"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835898"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-345"></span><span>
</span><span id="line-346"></span><span id="local-6989586621680835895"><span class="annot"><a href="GHC.Types.Id.html#mkSysLocalOrCoVarM"><span class="hs-identifier hs-type">mkSysLocalOrCoVarM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#MonadUnique"><span class="hs-identifier hs-type">MonadUnique</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680835895"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680835895"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span></span><span>
</span><span id="line-347"></span><span id="mkSysLocalOrCoVarM"><span class="annot"><span class="annottext">mkSysLocalOrCoVarM :: forall (m :: * -&gt; *).
MonadUnique m =&gt;
FastString -&gt; Kind -&gt; Kind -&gt; m Id
</span><a href="GHC.Types.Id.html#mkSysLocalOrCoVarM"><span class="hs-identifier hs-var hs-var">mkSysLocalOrCoVarM</span></a></span></span><span> </span><span id="local-6989586621680835889"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835889"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621680835888"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835888"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835887"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835887"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-348"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m Unique
forall (m :: * -&gt; *). MonadUnique m =&gt; m Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var">getUniqueM</span></a></span><span> </span><span class="annot"><span class="annottext">m Unique -&gt; (Unique -&gt; m Id) -&gt; m Id
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680835886"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835886"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; m Id
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Unique -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier hs-var">mkSysLocalOrCoVar</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680835889"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835886"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835888"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835887"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="hs-comment">-- | Create a user local 'Id'. These are local 'Id's (see &quot;GHC.Types.Var#globalvslocal&quot;) with a name and location that the user might recognize</span><span>
</span><span id="line-351"></span><span class="annot"><a href="GHC.Types.Id.html#mkUserLocal"><span class="hs-identifier hs-type">mkUserLocal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-352"></span><span id="mkUserLocal"><span class="annot"><span class="annottext">mkUserLocal :: OccName -&gt; Unique -&gt; Kind -&gt; Kind -&gt; SrcSpan -&gt; Id
</span><a href="GHC.Types.Id.html#mkUserLocal"><span class="hs-identifier hs-var hs-var">mkUserLocal</span></a></span></span><span> </span><span id="local-6989586621680835885"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680835885"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680835884"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835884"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680835883"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835883"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835882"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835882"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680835881"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680835881"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isCoVarType</span><span> </span><span class="hs-identifier">ty</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-353"></span><span>                                </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; Id
Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier hs-var">mkLocalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkInternalName"><span class="hs-identifier hs-var">mkInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835884"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680835885"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680835881"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835883"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835882"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-354"></span><span>
</span><span id="line-355"></span><span class="hs-comment">-- | Like 'mkUserLocal', but checks if we have a coercion type</span><span>
</span><span id="line-356"></span><span class="annot"><a href="GHC.Types.Id.html#mkUserLocalOrCoVar"><span class="hs-identifier hs-type">mkUserLocalOrCoVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Mult"><span class="hs-identifier hs-type">Mult</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-357"></span><span id="mkUserLocalOrCoVar"><span class="annot"><span class="annottext">mkUserLocalOrCoVar :: OccName -&gt; Unique -&gt; Kind -&gt; Kind -&gt; SrcSpan -&gt; Id
</span><a href="GHC.Types.Id.html#mkUserLocalOrCoVar"><span class="hs-identifier hs-var hs-var">mkUserLocalOrCoVar</span></a></span></span><span> </span><span id="local-6989586621680835879"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680835879"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680835878"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835878"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680835877"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835877"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835876"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835876"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680835875"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680835875"><span class="hs-identifier hs-var">loc</span></a></span></span><span>
</span><span id="line-358"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalIdOrCoVar"><span class="hs-identifier hs-var">mkLocalIdOrCoVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkInternalName"><span class="hs-identifier hs-var">mkInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835878"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680835879"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680835875"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835877"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835876"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="hs-comment">{-
Make some local @Ids@ for a template @CoreExpr@.  These have bogus
@Uniques@, but that's OK because the templates are supposed to be
instantiated before use.
-}</span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span class="hs-comment">-- | Workers get local names. &quot;CoreTidy&quot; will externalise these if necessary</span><span>
</span><span id="line-367"></span><span class="annot"><a href="GHC.Types.Id.html#mkWorkerId"><span class="hs-identifier hs-type">mkWorkerId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-368"></span><span id="mkWorkerId"><span class="annot"><span class="annottext">mkWorkerId :: Unique -&gt; Id -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkWorkerId"><span class="hs-identifier hs-var hs-var">mkWorkerId</span></a></span></span><span> </span><span id="local-6989586621680835874"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835874"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680835873"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835873"><span class="hs-identifier hs-var">unwrkr</span></a></span></span><span> </span><span id="local-6989586621680835872"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835872"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-369"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Kind -&gt; Kind -&gt; Id
Name -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkLocalId"><span class="hs-identifier hs-var">mkLocalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(OccName -&gt; OccName) -&gt; Unique -&gt; Name -&gt; Name
</span><a href="GHC.Types.Name.html#mkDerivedInternalName"><span class="hs-identifier hs-var">mkDerivedInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkWorkerOcc"><span class="hs-identifier hs-var">mkWorkerOcc</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680835874"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835873"><span class="hs-identifier hs-var">unwrkr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835872"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span class="hs-comment">-- | Create a /template local/: a family of system local 'Id's in bijection with @Int@s, typically used in unfoldings</span><span>
</span><span id="line-372"></span><span class="annot"><a href="GHC.Types.Id.html#mkTemplateLocal"><span class="hs-identifier hs-type">mkTemplateLocal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-373"></span><span id="mkTemplateLocal"><span class="annot"><span class="annottext">mkTemplateLocal :: Int -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkTemplateLocal"><span class="hs-identifier hs-var hs-var">mkTemplateLocal</span></a></span></span><span> </span><span id="local-6989586621680835868"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835868"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621680835867"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835867"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Scaled Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkScaledTemplateLocal"><span class="hs-identifier hs-var">mkScaledTemplateLocal</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835868"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Kind -&gt; Scaled Kind
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#unrestricted"><span class="hs-identifier hs-var">unrestricted</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835867"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHC.Types.Id.html#mkScaledTemplateLocal"><span class="hs-identifier hs-type">mkScaledTemplateLocal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-376"></span><span id="mkScaledTemplateLocal"><span class="annot"><span class="annottext">mkScaledTemplateLocal :: Int -&gt; Scaled Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkScaledTemplateLocal"><span class="hs-identifier hs-var hs-var">mkScaledTemplateLocal</span></a></span></span><span> </span><span id="local-6989586621680835865"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835865"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621680835864"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835864"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680835863"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835863"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Unique -&gt; Kind -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier hs-var">mkSysLocalOrCoVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;v&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkBuiltinUnique"><span class="hs-identifier hs-var">mkBuiltinUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835865"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835864"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835863"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-377"></span><span>   </span><span class="hs-comment">-- &quot;OrCoVar&quot; since this is used in a superclass selector,</span><span>
</span><span id="line-378"></span><span>   </span><span class="hs-comment">-- and &quot;~&quot; and &quot;~~&quot; have coercion &quot;superclasses&quot;.</span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="hs-comment">-- | Create a template local for a series of types</span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.Types.Id.html#mkTemplateLocals"><span class="hs-identifier hs-type">mkTemplateLocals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-382"></span><span id="mkTemplateLocals"><span class="annot"><span class="annottext">mkTemplateLocals :: [Kind] -&gt; [Id]
</span><a href="GHC.Types.Id.html#mkTemplateLocals"><span class="hs-identifier hs-var hs-var">mkTemplateLocals</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [Kind] -&gt; [Id]
</span><a href="GHC.Types.Id.html#mkTemplateLocalsNum"><span class="hs-identifier hs-var">mkTemplateLocalsNum</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="hs-comment">-- | Create a template local for a series of type, but start from a specified template local</span><span>
</span><span id="line-385"></span><span class="annot"><a href="GHC.Types.Id.html#mkTemplateLocalsNum"><span class="hs-identifier hs-type">mkTemplateLocalsNum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-386"></span><span id="mkTemplateLocalsNum"><span class="annot"><span class="annottext">mkTemplateLocalsNum :: Int -&gt; [Kind] -&gt; [Id]
</span><a href="GHC.Types.Id.html#mkTemplateLocalsNum"><span class="hs-identifier hs-var hs-var">mkTemplateLocalsNum</span></a></span></span><span> </span><span id="local-6989586621680835860"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835860"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680835859"><span class="annot"><span class="annottext">[Kind]
</span><a href="#local-6989586621680835859"><span class="hs-identifier hs-var">tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Kind -&gt; Id) -&gt; [Int] -&gt; [Kind] -&gt; [Id]
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="../../base/src/GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Kind -&gt; Id
</span><a href="GHC.Types.Id.html#mkTemplateLocal"><span class="hs-identifier hs-var">mkTemplateLocal</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835860"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Kind]
</span><a href="#local-6989586621680835859"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">{- Note [Exported LocalIds]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
We use mkExportedLocalId for things like
 - Dictionary functions (DFunId)
 - Wrapper and matcher Ids for pattern synonyms
 - Default methods for classes
 - Pattern-synonym matcher and builder Ids
 - etc

They marked as &quot;exported&quot; in the sense that they should be kept alive
even if apparently unused in other bindings, and not dropped as dead
code by the occurrence analyser.  (But &quot;exported&quot; here does not mean
&quot;brought into lexical scope by an import declaration&quot;. Indeed these
things are always internal Ids that the user never sees.)

It's very important that they are *LocalIds*, not GlobalIds, for lots
of reasons:

 * We want to treat them as free variables for the purpose of
   dependency analysis (e.g. GHC.Core.FVs.exprFreeVars).

 * Look them up in the current substitution when we come across
   occurrences of them (in Subst.lookupIdSubst). Lacking this we
   can get an out-of-date unfolding, which can in turn make the
   simplifier go into an infinite loop (#9857)

 * Ensure that for dfuns that the specialiser does not float dict uses
   above their defns, which would prevent good simplifications happening.

 * The strictness analyser treats a occurrence of a GlobalId as
   imported and assumes it contains strictness in its IdInfo, which
   isn't true if the thing is bound in the same module as the
   occurrence.

In CoreTidy we must make all these LocalIds into GlobalIds, so that in
importing modules (in --make mode) we treat them as properly global.
That is what is happening in, say tidy_insts in GHC.Iface.Tidy.

************************************************************************
*                                                                      *
\subsection{Special Ids}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-432"></span><span>
</span><span id="line-433"></span><span class="hs-comment">-- | If the 'Id' is that for a record selector, extract the 'sel_tycon'. Panic otherwise.</span><span>
</span><span id="line-434"></span><span class="annot"><a href="GHC.Types.Id.html#recordSelectorTyCon"><span class="hs-identifier hs-type">recordSelectorTyCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelParent"><span class="hs-identifier hs-type">RecSelParent</span></a></span><span>
</span><span id="line-435"></span><span id="recordSelectorTyCon"><span class="annot"><span class="annottext">recordSelectorTyCon :: Id -&gt; RecSelParent
</span><a href="GHC.Types.Id.html#recordSelectorTyCon"><span class="hs-identifier hs-var hs-var">recordSelectorTyCon</span></a></span></span><span> </span><span id="local-6989586621680835857"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835857"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-436"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835857"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-437"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelId"><span class="hs-identifier hs-type">RecSelId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">sel_tycon :: IdDetails -&gt; RecSelParent
</span><a href="GHC.Types.Id.Info.html#sel_tycon"><span class="hs-identifier hs-var">sel_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680835854"><span class="annot"><span class="annottext">RecSelParent
</span><a href="#local-6989586621680835854"><span class="hs-identifier hs-var">parent</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RecSelParent
</span><a href="#local-6989586621680835854"><span class="hs-identifier hs-var">parent</span></a></span><span>
</span><span id="line-438"></span><span>        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RecSelParent
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;recordSelectorTyCon&quot;</span></span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span>
</span><span id="line-441"></span><span class="annot"><a href="GHC.Types.Id.html#isRecordSelector"><span class="hs-identifier hs-type">isRecordSelector</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-442"></span><span class="annot"><a href="GHC.Types.Id.html#isNaughtyRecordSelector"><span class="hs-identifier hs-type">isNaughtyRecordSelector</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-443"></span><span class="annot"><a href="GHC.Types.Id.html#isPatSynRecordSelector"><span class="hs-identifier hs-type">isPatSynRecordSelector</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-444"></span><span class="annot"><a href="GHC.Types.Id.html#isDataConRecordSelector"><span class="hs-identifier hs-type">isDataConRecordSelector</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-445"></span><span class="annot"><a href="GHC.Types.Id.html#isPrimOpId"><span class="hs-identifier hs-type">isPrimOpId</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-446"></span><span class="annot"><a href="GHC.Types.Id.html#isFCallId"><span class="hs-identifier hs-type">isFCallId</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-447"></span><span class="annot"><a href="GHC.Types.Id.html#isDataConWorkId"><span class="hs-identifier hs-type">isDataConWorkId</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-448"></span><span class="annot"><a href="GHC.Types.Id.html#isDataConWrapId"><span class="hs-identifier hs-type">isDataConWrapId</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-449"></span><span class="annot"><a href="GHC.Types.Id.html#isDFunId"><span class="hs-identifier hs-type">isDFunId</span></a></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="annot"><a href="GHC.Types.Id.html#isClassOpId_maybe"><span class="hs-identifier hs-type">isClassOpId_maybe</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span>
</span><span id="line-452"></span><span class="annot"><a href="GHC.Types.Id.html#isPrimOpId_maybe"><span class="hs-identifier hs-type">isPrimOpId_maybe</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html#PrimOp"><span class="hs-identifier hs-type">PrimOp</span></a></span><span>
</span><span id="line-453"></span><span class="annot"><a href="GHC.Types.Id.html#isFCallId_maybe"><span class="hs-identifier hs-type">isFCallId_maybe</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.ForeignCall.html#ForeignCall"><span class="hs-identifier hs-type">ForeignCall</span></a></span><span>
</span><span id="line-454"></span><span class="annot"><a href="GHC.Types.Id.html#isDataConWorkId_maybe"><span class="hs-identifier hs-type">isDataConWorkId_maybe</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-455"></span><span class="annot"><a href="GHC.Types.Id.html#isDataConWrapId_maybe"><span class="hs-identifier hs-type">isDataConWrapId_maybe</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span id="isRecordSelector"><span class="annot"><span class="annottext">isRecordSelector :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isRecordSelector"><span class="hs-identifier hs-var hs-var">isRecordSelector</span></a></span></span><span> </span><span id="local-6989586621680835852"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835852"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835852"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-458"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelId"><span class="hs-identifier hs-type">RecSelId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-459"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-460"></span><span>
</span><span id="line-461"></span><span id="isDataConRecordSelector"><span class="annot"><span class="annottext">isDataConRecordSelector :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDataConRecordSelector"><span class="hs-identifier hs-var hs-var">isDataConRecordSelector</span></a></span></span><span> </span><span id="local-6989586621680835851"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835851"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835851"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-462"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelId"><span class="hs-identifier hs-type">RecSelId</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">sel_tycon :: IdDetails -&gt; RecSelParent
</span><a href="GHC.Types.Id.Info.html#sel_tycon"><span class="hs-identifier hs-var">sel_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelData"><span class="hs-identifier hs-type">RecSelData</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-463"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-464"></span><span>
</span><span id="line-465"></span><span id="isPatSynRecordSelector"><span class="annot"><span class="annottext">isPatSynRecordSelector :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isPatSynRecordSelector"><span class="hs-identifier hs-var hs-var">isPatSynRecordSelector</span></a></span></span><span> </span><span id="local-6989586621680835849"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835849"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835849"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-466"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelId"><span class="hs-identifier hs-type">RecSelId</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">sel_tycon :: IdDetails -&gt; RecSelParent
</span><a href="GHC.Types.Id.Info.html#sel_tycon"><span class="hs-identifier hs-var">sel_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelPatSyn"><span class="hs-identifier hs-type">RecSelPatSyn</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-467"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span id="isNaughtyRecordSelector"><span class="annot"><span class="annottext">isNaughtyRecordSelector :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isNaughtyRecordSelector"><span class="hs-identifier hs-var hs-var">isNaughtyRecordSelector</span></a></span></span><span> </span><span id="local-6989586621680835847"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835847"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835847"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-470"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#RecSelId"><span class="hs-identifier hs-type">RecSelId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">sel_naughty :: IdDetails -&gt; Bool
</span><a href="GHC.Types.Id.Info.html#sel_naughty"><span class="hs-identifier hs-var">sel_naughty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680835845"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680835845"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680835845"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-471"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>                               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-472"></span><span>
</span><span id="line-473"></span><span id="isClassOpId_maybe"><span class="annot"><span class="annottext">isClassOpId_maybe :: Id -&gt; Maybe Class
</span><a href="GHC.Types.Id.html#isClassOpId_maybe"><span class="hs-identifier hs-var hs-var">isClassOpId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835844"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835844"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835844"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-474"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#ClassOpId"><span class="hs-identifier hs-type">ClassOpId</span></a></span><span> </span><span id="local-6989586621680835842"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680835842"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Maybe Class
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680835842"><span class="hs-identifier hs-var">cls</span></a></span><span>
</span><span id="line-475"></span><span>                        </span><span id="local-6989586621680835841"><span class="annot"><span class="annottext">IdDetails
</span><a href="#local-6989586621680835841"><span class="hs-identifier hs-var">_other</span></a></span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Class
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-476"></span><span>
</span><span id="line-477"></span><span id="isPrimOpId"><span class="annot"><span class="annottext">isPrimOpId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isPrimOpId"><span class="hs-identifier hs-var hs-var">isPrimOpId</span></a></span></span><span> </span><span id="local-6989586621680835840"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835840"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835840"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-478"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#PrimOpId"><span class="hs-identifier hs-type">PrimOpId</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-479"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span id="isDFunId"><span class="annot"><span class="annottext">isDFunId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDFunId"><span class="hs-identifier hs-var hs-var">isDFunId</span></a></span></span><span> </span><span id="local-6989586621680835838"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835838"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835838"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-482"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DFunId"><span class="hs-identifier hs-type">DFunId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-483"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span id="isPrimOpId_maybe"><span class="annot"><span class="annottext">isPrimOpId_maybe :: Id -&gt; Maybe PrimOp
</span><a href="GHC.Types.Id.html#isPrimOpId_maybe"><span class="hs-identifier hs-var hs-var">isPrimOpId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835836"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835836"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835836"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-486"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#PrimOpId"><span class="hs-identifier hs-type">PrimOpId</span></a></span><span> </span><span id="local-6989586621680835835"><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680835835"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; Maybe PrimOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680835835"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-487"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe PrimOp
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-488"></span><span>
</span><span id="line-489"></span><span id="isFCallId"><span class="annot"><span class="annottext">isFCallId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isFCallId"><span class="hs-identifier hs-var hs-var">isFCallId</span></a></span></span><span> </span><span id="local-6989586621680835834"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835834"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835834"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-490"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#FCallId"><span class="hs-identifier hs-type">FCallId</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignCall
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-491"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-492"></span><span>
</span><span id="line-493"></span><span id="isFCallId_maybe"><span class="annot"><span class="annottext">isFCallId_maybe :: Id -&gt; Maybe ForeignCall
</span><a href="GHC.Types.Id.html#isFCallId_maybe"><span class="hs-identifier hs-var hs-var">isFCallId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835832"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835832"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835832"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-494"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#FCallId"><span class="hs-identifier hs-type">FCallId</span></a></span><span> </span><span id="local-6989586621680835831"><span class="annot"><span class="annottext">ForeignCall
</span><a href="#local-6989586621680835831"><span class="hs-identifier hs-var">call</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignCall -&gt; Maybe ForeignCall
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignCall
</span><a href="#local-6989586621680835831"><span class="hs-identifier hs-var">call</span></a></span><span>
</span><span id="line-495"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe ForeignCall
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-496"></span><span>
</span><span id="line-497"></span><span id="isDataConWorkId"><span class="annot"><span class="annottext">isDataConWorkId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDataConWorkId"><span class="hs-identifier hs-var hs-var">isDataConWorkId</span></a></span></span><span> </span><span id="local-6989586621680835830"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835830"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835830"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-498"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWorkId"><span class="hs-identifier hs-type">DataConWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-499"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span id="isDataConWorkId_maybe"><span class="annot"><span class="annottext">isDataConWorkId_maybe :: Id -&gt; Maybe DataCon
</span><a href="GHC.Types.Id.html#isDataConWorkId_maybe"><span class="hs-identifier hs-var hs-var">isDataConWorkId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835828"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835828"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835828"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-502"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWorkId"><span class="hs-identifier hs-type">DataConWorkId</span></a></span><span> </span><span id="local-6989586621680835827"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835827"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Maybe DataCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835827"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-503"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe DataCon
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-504"></span><span>
</span><span id="line-505"></span><span id="isDataConWrapId"><span class="annot"><span class="annottext">isDataConWrapId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDataConWrapId"><span class="hs-identifier hs-var hs-var">isDataConWrapId</span></a></span></span><span> </span><span id="local-6989586621680835826"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835826"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835826"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-506"></span><span>                       </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWrapId"><span class="hs-identifier hs-type">DataConWrapId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-507"></span><span>                       </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-508"></span><span>
</span><span id="line-509"></span><span id="isDataConWrapId_maybe"><span class="annot"><span class="annottext">isDataConWrapId_maybe :: Id -&gt; Maybe DataCon
</span><a href="GHC.Types.Id.html#isDataConWrapId_maybe"><span class="hs-identifier hs-var hs-var">isDataConWrapId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835824"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835824"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835824"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-510"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWrapId"><span class="hs-identifier hs-type">DataConWrapId</span></a></span><span> </span><span id="local-6989586621680835823"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835823"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Maybe DataCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835823"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-511"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe DataCon
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-512"></span><span>
</span><span id="line-513"></span><span class="annot"><a href="GHC.Types.Id.html#isDataConId_maybe"><span class="hs-identifier hs-type">isDataConId_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-514"></span><span id="isDataConId_maybe"><span class="annot"><span class="annottext">isDataConId_maybe :: Id -&gt; Maybe DataCon
</span><a href="GHC.Types.Id.html#isDataConId_maybe"><span class="hs-identifier hs-var hs-var">isDataConId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835822"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835822"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835822"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-515"></span><span>                         </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWorkId"><span class="hs-identifier hs-type">DataConWorkId</span></a></span><span> </span><span id="local-6989586621680835821"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835821"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Maybe DataCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835821"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-516"></span><span>                         </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWrapId"><span class="hs-identifier hs-type">DataConWrapId</span></a></span><span> </span><span id="local-6989586621680835820"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835820"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Maybe DataCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835820"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-517"></span><span>                         </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe DataCon
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span class="annot"><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier hs-type">isJoinId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-520"></span><span class="hs-comment">-- It is convenient in GHC.Core.Opt.SetLevels.lvlMFE to apply isJoinId</span><span>
</span><span id="line-521"></span><span class="hs-comment">-- to the free vars of an expression, so it's convenient</span><span>
</span><span id="line-522"></span><span class="hs-comment">-- if it returns False for type variables</span><span>
</span><span id="line-523"></span><span id="isJoinId"><span class="annot"><span class="annottext">isJoinId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier hs-var hs-var">isJoinId</span></a></span></span><span> </span><span id="local-6989586621680835819"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835819"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-524"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835819"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835819"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-525"></span><span>                </span><span class="annot"><a href="GHC.Types.Id.Info.html#JoinId"><span class="hs-identifier hs-type">JoinId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-526"></span><span>                </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-527"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-528"></span><span>
</span><span id="line-529"></span><span class="annot"><a href="GHC.Types.Id.html#isJoinId_maybe"><span class="hs-identifier hs-type">isJoinId_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#JoinArity"><span class="hs-identifier hs-type">JoinArity</span></a></span><span>
</span><span id="line-530"></span><span id="isJoinId_maybe"><span class="annot"><span class="annottext">isJoinId_maybe :: Id -&gt; Maybe Int
</span><a href="GHC.Types.Id.html#isJoinId_maybe"><span class="hs-identifier hs-var hs-var">isJoinId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835816"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835816"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-531"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835816"><span class="hs-identifier hs-var">id</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isId</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">id</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-532"></span><span>              </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835816"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-533"></span><span>                </span><span class="annot"><a href="GHC.Types.Id.Info.html#JoinId"><span class="hs-identifier hs-type">JoinId</span></a></span><span> </span><span id="local-6989586621680835813"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835813"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835813"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-534"></span><span>                </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-535"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.Types.Id.html#idDataCon"><span class="hs-identifier hs-type">idDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-538"></span><span class="hs-comment">-- ^ Get from either the worker or the wrapper 'Id' to the 'DataCon'. Currently used only in the desugarer.</span><span>
</span><span id="line-539"></span><span class="hs-comment">--</span><span>
</span><span id="line-540"></span><span class="hs-comment">-- INVARIANT: @idDataCon (dataConWrapId d) = d@: remember, 'dataConWrapId' can return either the wrapper or the worker</span><span>
</span><span id="line-541"></span><span id="idDataCon"><span class="annot"><span class="annottext">idDataCon :: Id -&gt; DataCon
</span><a href="GHC.Types.Id.html#idDataCon"><span class="hs-identifier hs-var hs-var">idDataCon</span></a></span></span><span> </span><span id="local-6989586621680835812"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835812"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Maybe DataCon
</span><a href="GHC.Types.Id.html#isDataConId_maybe"><span class="hs-identifier hs-var">isDataConId_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835812"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe DataCon -&gt; DataCon -&gt; DataCon
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; DataCon
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;idDataCon&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835812"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-542"></span><span>
</span><span id="line-543"></span><span class="annot"><a href="GHC.Types.Id.html#hasNoBinding"><span class="hs-identifier hs-type">hasNoBinding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-544"></span><span class="hs-comment">-- ^ Returns @True@ of an 'Id' which may not have a</span><span>
</span><span id="line-545"></span><span class="hs-comment">-- binding, even though it is defined in this module.</span><span>
</span><span id="line-546"></span><span>
</span><span id="line-547"></span><span class="hs-comment">-- Data constructor workers used to be things of this kind, but they aren't any</span><span>
</span><span id="line-548"></span><span class="hs-comment">-- more.  Instead, we inject a binding for them at the CorePrep stage. The</span><span>
</span><span id="line-549"></span><span class="hs-comment">-- exception to this is unboxed tuples and sums datacons, which definitely have</span><span>
</span><span id="line-550"></span><span class="hs-comment">-- no binding</span><span>
</span><span id="line-551"></span><span id="hasNoBinding"><span class="annot"><span class="annottext">hasNoBinding :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#hasNoBinding"><span class="hs-identifier hs-var hs-var">hasNoBinding</span></a></span></span><span> </span><span id="local-6989586621680835809"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835809"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835809"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-552"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#PrimOpId"><span class="hs-identifier hs-type">PrimOpId</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>    </span><span class="hs-comment">-- See Note [Eta expanding primops] in GHC.Builtin.PrimOps</span><span>
</span><span id="line-553"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#FCallId"><span class="hs-identifier hs-type">FCallId</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignCall
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-554"></span><span>                        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWorkId"><span class="hs-identifier hs-type">DataConWorkId</span></a></span><span> </span><span id="local-6989586621680835808"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835808"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedTupleCon"><span class="hs-identifier hs-var">isUnboxedTupleCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835808"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedSumCon"><span class="hs-identifier hs-var">isUnboxedSumCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680835808"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-555"></span><span>                        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unfolding -&gt; Bool
</span><a href="GHC.Core.html#isCompulsoryUnfolding"><span class="hs-identifier hs-var">isCompulsoryUnfolding</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Unfolding
</span><a href="GHC.Types.Id.html#idUnfolding"><span class="hs-identifier hs-var">idUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835809"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-556"></span><span>                                            </span><span class="hs-comment">-- See Note [Levity-polymorphic Ids]</span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span class="annot"><a href="GHC.Types.Id.html#isImplicitId"><span class="hs-identifier hs-type">isImplicitId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-559"></span><span class="hs-comment">-- ^ 'isImplicitId' tells whether an 'Id's info is implied by other</span><span>
</span><span id="line-560"></span><span class="hs-comment">-- declarations, so we don't need to put its signature in an interface</span><span>
</span><span id="line-561"></span><span class="hs-comment">-- file, even if it's mentioned in some other interface unfolding.</span><span>
</span><span id="line-562"></span><span id="isImplicitId"><span class="annot"><span class="annottext">isImplicitId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isImplicitId"><span class="hs-identifier hs-var hs-var">isImplicitId</span></a></span></span><span> </span><span id="local-6989586621680835804"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835804"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-563"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835804"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-564"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Info.html#FCallId"><span class="hs-identifier hs-type">FCallId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-565"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Info.html#ClassOpId"><span class="hs-identifier hs-type">ClassOpId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-566"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Info.html#PrimOpId"><span class="hs-identifier hs-type">PrimOpId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-567"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWorkId"><span class="hs-identifier hs-type">DataConWorkId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-568"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Info.html#DataConWrapId"><span class="hs-identifier hs-type">DataConWrapId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-569"></span><span>                </span><span class="hs-comment">-- These are implied by their type or class decl;</span><span>
</span><span id="line-570"></span><span>                </span><span class="hs-comment">-- remember that all type and class decls appear in the interface file.</span><span>
</span><span id="line-571"></span><span>                </span><span class="hs-comment">-- The dfun id is not an implicit Id; it must *not* be omitted, because</span><span>
</span><span id="line-572"></span><span>                </span><span class="hs-comment">-- it carries version info for the instance decl</span><span>
</span><span id="line-573"></span><span>        </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-574"></span><span>
</span><span id="line-575"></span><span class="annot"><a href="GHC.Types.Id.html#idIsFrom"><span class="hs-identifier hs-type">idIsFrom</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-576"></span><span id="idIsFrom"><span class="annot"><span class="annottext">idIsFrom :: Module -&gt; Id -&gt; Bool
</span><a href="GHC.Types.Id.html#idIsFrom"><span class="hs-identifier hs-var hs-var">idIsFrom</span></a></span></span><span> </span><span id="local-6989586621680835803"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680835803"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680835802"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835802"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var">nameIsLocalOrFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680835803"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835802"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-577"></span><span>
</span><span id="line-578"></span><span class="hs-comment">{- Note [Levity-polymorphic Ids]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some levity-polymorphic Ids must be applied and inlined, not left
un-saturated.  Example:
  unsafeCoerceId :: forall r1 r2 (a::TYPE r1) (b::TYPE r2). a -&gt; b

This has a compulsory unfolding because we can't lambda-bind those
arguments.  But the compulsory unfolding may leave levity-polymorphic
lambdas if it is not applied to enough arguments; e.g. (#14561)
  bad :: forall (a :: TYPE r). a -&gt; a
  bad = unsafeCoerce#

The desugar has special magic to detect such cases: GHC.HsToCore.Expr.badUseOfLevPolyPrimop.
And we want that magic to apply to levity-polymorphic compulsory-inline things.
The easiest way to do this is for hasNoBinding to return True of all things
that have compulsory unfolding.  Some Ids with a compulsory unfolding also
have a binding, but it does not harm to say they don't here, and its a very
simple way to fix #14561.
-}</span><span>
</span><span id="line-597"></span><span>
</span><span id="line-598"></span><span class="annot"><a href="GHC.Types.Id.html#isDeadBinder"><span class="hs-identifier hs-type">isDeadBinder</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-599"></span><span id="isDeadBinder"><span class="annot"><span class="annottext">isDeadBinder :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDeadBinder"><span class="hs-identifier hs-var hs-var">isDeadBinder</span></a></span></span><span> </span><span id="local-6989586621680835800"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835800"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835800"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccInfo -&gt; Bool
</span><a href="GHC.Types.Basic.html#isDeadOcc"><span class="hs-identifier hs-var">isDeadOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; OccInfo
</span><a href="GHC.Types.Id.html#idOccInfo"><span class="hs-identifier hs-var">idOccInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835800"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-600"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>   </span><span class="hs-comment">-- TyVars count as not dead</span><span>
</span><span id="line-601"></span><span>
</span><span id="line-602"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
              Join variables
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-609"></span><span>
</span><span id="line-610"></span><span class="annot"><a href="GHC.Types.Id.html#idJoinArity"><span class="hs-identifier hs-type">idJoinArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#JoinId"><span class="hs-identifier hs-type">JoinId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#JoinArity"><span class="hs-identifier hs-type">JoinArity</span></a></span><span>
</span><span id="line-611"></span><span id="idJoinArity"><span class="annot"><span class="annottext">idJoinArity :: Id -&gt; Int
</span><a href="GHC.Types.Id.html#idJoinArity"><span class="hs-identifier hs-var hs-var">idJoinArity</span></a></span></span><span> </span><span id="local-6989586621680835798"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835798"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Maybe Int
</span><a href="GHC.Types.Id.html#isJoinId_maybe"><span class="hs-identifier hs-var">isJoinId_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835798"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Int -&gt; Int
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Int
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;idJoinArity&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835798"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-612"></span><span>
</span><span id="line-613"></span><span class="annot"><a href="GHC.Types.Id.html#asJoinId"><span class="hs-identifier hs-type">asJoinId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#JoinArity"><span class="hs-identifier hs-type">JoinArity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#JoinId"><span class="hs-identifier hs-type">JoinId</span></a></span><span>
</span><span id="line-614"></span><span id="asJoinId"><span class="annot"><span class="annottext">asJoinId :: Id -&gt; Int -&gt; Id
</span><a href="GHC.Types.Id.html#asJoinId"><span class="hs-identifier hs-var hs-var">asJoinId</span></a></span></span><span> </span><span id="local-6989586621680835797"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835797"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835796"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835796"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">WARN</span><span class="hs-special">(</span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isLocalId</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-615"></span><span>                         </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;global id being marked as join var:&quot;</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span>
</span><span id="line-616"></span><span>                    </span><span class="hs-identifier">WARN</span><span class="hs-special">(</span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">is_vanilla_or_join</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-617"></span><span>                         </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">id</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">pprIdDetails</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">idDetails</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-618"></span><span>                    </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835797"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails -&gt; Id
</span><a href="GHC.Types.Var.html#setIdDetails"><span class="hs-operator hs-var">`setIdDetails`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#JoinId"><span class="hs-identifier hs-var">JoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835796"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-619"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-620"></span><span>    </span><span id="local-6989586621680835792"><span class="annot"><span class="annottext">is_vanilla_or_join :: Id -&gt; Bool
</span><a href="#local-6989586621680835792"><span class="hs-identifier hs-var hs-var">is_vanilla_or_join</span></a></span></span><span> </span><span id="local-6989586621680835790"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835790"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">Var.idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835790"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-621"></span><span>                              </span><span class="annot"><span class="annottext">IdDetails
</span><a href="GHC.Types.Id.Info.html#VanillaId"><span class="hs-identifier hs-var">VanillaId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-622"></span><span>                              </span><span class="annot"><a href="GHC.Types.Id.Info.html#JoinId"><span class="hs-identifier hs-type">JoinId</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-623"></span><span>                              </span><span class="annot"><span class="annottext">IdDetails
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-624"></span><span>
</span><span id="line-625"></span><span class="annot"><a href="GHC.Types.Id.html#zapJoinId"><span class="hs-identifier hs-type">zapJoinId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-626"></span><span class="hs-comment">-- May be a regular id already</span><span>
</span><span id="line-627"></span><span id="zapJoinId"><span class="annot"><span class="annottext">zapJoinId :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapJoinId"><span class="hs-identifier hs-var hs-var">zapJoinId</span></a></span></span><span> </span><span id="local-6989586621680835789"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835789"><span class="hs-identifier hs-var">jid</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier hs-var">isJoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835789"><span class="hs-identifier hs-var">jid</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdTailCallInfo"><span class="hs-identifier hs-var">zapIdTailCallInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835789"><span class="hs-identifier hs-var">jid</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IdDetails -&gt; Id
</span><a href="GHC.Types.Var.html#setIdDetails"><span class="hs-operator hs-var">`setIdDetails`</span></a></span><span> </span><span class="annot"><span class="annottext">IdDetails
</span><a href="GHC.Types.Id.Info.html#VanillaId"><span class="hs-identifier hs-var">VanillaId</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-628"></span><span>                                 </span><span class="hs-comment">-- Core Lint may complain if still marked</span><span>
</span><span id="line-629"></span><span>                                 </span><span class="hs-comment">-- as AlwaysTailCalled</span><span>
</span><span id="line-630"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835789"><span class="hs-identifier hs-var">jid</span></a></span><span>
</span><span id="line-631"></span><span>
</span><span id="line-632"></span><span class="annot"><a href="GHC.Types.Id.html#asJoinId_maybe"><span class="hs-identifier hs-type">asJoinId_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#JoinArity"><span class="hs-identifier hs-type">JoinArity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-633"></span><span id="asJoinId_maybe"><span class="annot"><span class="annottext">asJoinId_maybe :: Id -&gt; Maybe Int -&gt; Id
</span><a href="GHC.Types.Id.html#asJoinId_maybe"><span class="hs-identifier hs-var hs-var">asJoinId_maybe</span></a></span></span><span> </span><span id="local-6989586621680835788"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835788"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680835787"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835787"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Int -&gt; Id
</span><a href="GHC.Types.Id.html#asJoinId"><span class="hs-identifier hs-var">asJoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835788"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835787"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-634"></span><span class="annot"><a href="GHC.Types.Id.html#asJoinId_maybe"><span class="hs-identifier hs-var">asJoinId_maybe</span></a></span><span> </span><span id="local-6989586621680835786"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835786"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapJoinId"><span class="hs-identifier hs-var">zapJoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835786"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-635"></span><span>
</span><span id="line-636"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{IdInfo stuff}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-643"></span><span>
</span><span id="line-644"></span><span>        </span><span class="hs-comment">---------------------------------</span><span>
</span><span id="line-645"></span><span>        </span><span class="hs-comment">-- ARITY</span><span>
</span><span id="line-646"></span><span class="annot"><a href="GHC.Types.Id.html#idArity"><span class="hs-identifier hs-type">idArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>
</span><span id="line-647"></span><span id="idArity"><span class="annot"><span class="annottext">idArity :: Id -&gt; Int
</span><a href="GHC.Types.Id.html#idArity"><span class="hs-identifier hs-var hs-var">idArity</span></a></span></span><span> </span><span id="local-6989586621680835784"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835784"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Int
</span><a href="GHC.Types.Id.Info.html#arityInfo"><span class="hs-identifier hs-var">arityInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835784"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-648"></span><span>
</span><span id="line-649"></span><span class="annot"><a href="GHC.Types.Id.html#setIdArity"><span class="hs-identifier hs-type">setIdArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-650"></span><span id="setIdArity"><span class="annot"><span class="annottext">setIdArity :: Id -&gt; Int -&gt; Id
</span><a href="GHC.Types.Id.html#setIdArity"><span class="hs-identifier hs-var hs-var">setIdArity</span></a></span></span><span> </span><span id="local-6989586621680835782"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835782"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835781"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835781"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; Int -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835781"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835782"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-651"></span><span>
</span><span id="line-652"></span><span class="annot"><a href="GHC.Types.Id.html#idCallArity"><span class="hs-identifier hs-type">idCallArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>
</span><span id="line-653"></span><span id="idCallArity"><span class="annot"><span class="annottext">idCallArity :: Id -&gt; Int
</span><a href="GHC.Types.Id.html#idCallArity"><span class="hs-identifier hs-var hs-var">idCallArity</span></a></span></span><span> </span><span id="local-6989586621680835779"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835779"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Int
</span><a href="GHC.Types.Id.Info.html#callArityInfo"><span class="hs-identifier hs-var">callArityInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835779"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-654"></span><span>
</span><span id="line-655"></span><span class="annot"><a href="GHC.Types.Id.html#setIdCallArity"><span class="hs-identifier hs-type">setIdCallArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-656"></span><span id="setIdCallArity"><span class="annot"><span class="annottext">setIdCallArity :: Id -&gt; Int -&gt; Id
</span><a href="GHC.Types.Id.html#setIdCallArity"><span class="hs-identifier hs-var hs-var">setIdCallArity</span></a></span></span><span> </span><span id="local-6989586621680835777"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835777"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835776"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835776"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; Int -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCallArityInfo"><span class="hs-operator hs-var">`setCallArityInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835776"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835777"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span class="annot"><a href="GHC.Types.Id.html#idFunRepArity"><span class="hs-identifier hs-type">idFunRepArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span>
</span><span id="line-659"></span><span id="idFunRepArity"><span class="annot"><span class="annottext">idFunRepArity :: Id -&gt; Int
</span><a href="GHC.Types.Id.html#idFunRepArity"><span class="hs-identifier hs-var hs-var">idFunRepArity</span></a></span></span><span> </span><span id="local-6989586621680835773"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835773"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Kind -&gt; Int
</span><a href="GHC.Types.RepType.html#countFunRepArgs"><span class="hs-identifier hs-var">countFunRepArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Int
</span><a href="GHC.Types.Id.html#idArity"><span class="hs-identifier hs-var">idArity</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835773"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835773"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-660"></span><span>
</span><span id="line-661"></span><span class="hs-comment">-- | Returns true if an application to n args diverges or throws an exception</span><span>
</span><span id="line-662"></span><span class="hs-comment">-- See Note [Dead ends] in &quot;GHC.Types.Demand&quot;.</span><span>
</span><span id="line-663"></span><span class="annot"><a href="GHC.Types.Id.html#isDeadEndId"><span class="hs-identifier hs-type">isDeadEndId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-664"></span><span id="isDeadEndId"><span class="annot"><span class="annottext">isDeadEndId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isDeadEndId"><span class="hs-identifier hs-var hs-var">isDeadEndId</span></a></span></span><span> </span><span id="local-6989586621680835771"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835771"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-665"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835771"><span class="hs-identifier hs-var">v</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StrictSig -&gt; Bool
</span><a href="GHC.Types.Demand.html#isDeadEndSig"><span class="hs-identifier hs-var">isDeadEndSig</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; StrictSig
</span><a href="GHC.Types.Id.html#idStrictness"><span class="hs-identifier hs-var">idStrictness</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835771"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-666"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-667"></span><span>
</span><span id="line-668"></span><span class="hs-comment">-- | Accesses the 'Id''s 'strictnessInfo'.</span><span>
</span><span id="line-669"></span><span class="annot"><a href="GHC.Types.Id.html#idStrictness"><span class="hs-identifier hs-type">idStrictness</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Demand.html#StrictSig"><span class="hs-identifier hs-type">StrictSig</span></a></span><span>
</span><span id="line-670"></span><span id="idStrictness"><span class="annot"><span class="annottext">idStrictness :: Id -&gt; StrictSig
</span><a href="GHC.Types.Id.html#idStrictness"><span class="hs-identifier hs-var hs-var">idStrictness</span></a></span></span><span> </span><span id="local-6989586621680835769"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835769"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig
</span><a href="GHC.Types.Id.Info.html#strictnessInfo"><span class="hs-identifier hs-var hs-var">strictnessInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835769"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="annot"><a href="GHC.Types.Id.html#setIdStrictness"><span class="hs-identifier hs-type">setIdStrictness</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Demand.html#StrictSig"><span class="hs-identifier hs-type">StrictSig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-673"></span><span id="setIdStrictness"><span class="annot"><span class="annottext">setIdStrictness :: Id -&gt; StrictSig -&gt; Id
</span><a href="GHC.Types.Id.html#setIdStrictness"><span class="hs-identifier hs-var hs-var">setIdStrictness</span></a></span></span><span> </span><span id="local-6989586621680835767"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835767"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835766"><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680835766"><span class="hs-identifier hs-var">sig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680835766"><span class="hs-identifier hs-var">sig</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835767"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-674"></span><span>
</span><span id="line-675"></span><span class="annot"><a href="GHC.Types.Id.html#idCprInfo"><span class="hs-identifier hs-type">idCprInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Cpr.html#CprSig"><span class="hs-identifier hs-type">CprSig</span></a></span><span>
</span><span id="line-676"></span><span id="idCprInfo"><span class="annot"><span class="annottext">idCprInfo :: Id -&gt; CprSig
</span><a href="GHC.Types.Id.html#idCprInfo"><span class="hs-identifier hs-var hs-var">idCprInfo</span></a></span></span><span> </span><span id="local-6989586621680835764"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835764"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig
</span><a href="GHC.Types.Id.Info.html#cprInfo"><span class="hs-identifier hs-var hs-var">cprInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835764"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span class="annot"><a href="GHC.Types.Id.html#setIdCprInfo"><span class="hs-identifier hs-type">setIdCprInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Cpr.html#CprSig"><span class="hs-identifier hs-type">CprSig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-679"></span><span id="setIdCprInfo"><span class="annot"><span class="annottext">setIdCprInfo :: Id -&gt; CprSig -&gt; Id
</span><a href="GHC.Types.Id.html#setIdCprInfo"><span class="hs-identifier hs-var hs-var">setIdCprInfo</span></a></span></span><span> </span><span id="local-6989586621680835762"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835762"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835761"><span class="annot"><span class="annottext">CprSig
</span><a href="#local-6989586621680835761"><span class="hs-identifier hs-var">sig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680835760"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835760"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-identifier hs-var">setCprInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835760"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CprSig
</span><a href="#local-6989586621680835761"><span class="hs-identifier hs-var">sig</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835762"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-680"></span><span>
</span><span id="line-681"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdStrictness"><span class="hs-identifier hs-type">zapIdStrictness</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-682"></span><span id="zapIdStrictness"><span class="annot"><span class="annottext">zapIdStrictness :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdStrictness"><span class="hs-identifier hs-var hs-var">zapIdStrictness</span></a></span></span><span> </span><span id="local-6989586621680835758"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835758"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">StrictSig
</span><a href="GHC.Types.Demand.html#nopSig"><span class="hs-identifier hs-var">nopSig</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835758"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-683"></span><span>
</span><span id="line-684"></span><span class="hs-comment">-- | This predicate says whether the 'Id' has a strict demand placed on it or</span><span>
</span><span id="line-685"></span><span class="hs-comment">-- has a type such that it can always be evaluated strictly (i.e an</span><span>
</span><span id="line-686"></span><span class="hs-comment">-- unlifted type, as of GHC 7.6).  We need to</span><span>
</span><span id="line-687"></span><span class="hs-comment">-- check separately whether the 'Id' has a so-called \&quot;strict type\&quot; because if</span><span>
</span><span id="line-688"></span><span class="hs-comment">-- the demand for the given @id@ hasn't been computed yet but @id@ has a strict</span><span>
</span><span id="line-689"></span><span class="hs-comment">-- type, we still want @isStrictId id@ to be @True@.</span><span>
</span><span id="line-690"></span><span class="annot"><a href="GHC.Types.Id.html#isStrictId"><span class="hs-identifier hs-type">isStrictId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-691"></span><span id="isStrictId"><span class="annot"><span class="annottext">isStrictId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isStrictId"><span class="hs-identifier hs-var hs-var">isStrictId</span></a></span></span><span> </span><span id="local-6989586621680835756"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835756"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-692"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isId</span><span> </span><span class="hs-identifier">id</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;isStrictId: not an id: &quot;</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">id</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-693"></span><span>         </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier hs-var">isJoinId</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835756"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-694"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Kind -&gt; Bool
Kind -&gt; Bool
</span><a href="GHC.Core.Type.html#isStrictType"><span class="hs-identifier hs-var">isStrictType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835756"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span>
</span><span id="line-695"></span><span>           </span><span class="hs-comment">-- Take the best of both strictnesses - old and new</span><span>
</span><span id="line-696"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">JointDmd (Str StrDmd) (Use UseDmd) -&gt; Bool
forall s u. JointDmd (Str s) (Use u) -&gt; Bool
</span><a href="GHC.Types.Demand.html#isStrictDmd"><span class="hs-identifier hs-var">isStrictDmd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; JointDmd (Str StrDmd) (Use UseDmd)
</span><a href="GHC.Types.Id.html#idDemandInfo"><span class="hs-identifier hs-var">idDemandInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835756"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-697"></span><span>         </span><span class="hs-special">)</span><span>
</span><span id="line-698"></span><span>
</span><span id="line-699"></span><span>        </span><span class="hs-comment">---------------------------------</span><span>
</span><span id="line-700"></span><span>        </span><span class="hs-comment">-- UNFOLDING</span><span>
</span><span id="line-701"></span><span class="annot"><a href="GHC.Types.Id.html#idUnfolding"><span class="hs-identifier hs-type">idUnfolding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#Unfolding"><span class="hs-identifier hs-type">Unfolding</span></a></span><span>
</span><span id="line-702"></span><span class="hs-comment">-- Do not expose the unfolding of a loop breaker!</span><span>
</span><span id="line-703"></span><span id="idUnfolding"><span class="annot"><span class="annottext">idUnfolding :: Id -&gt; Unfolding
</span><a href="GHC.Types.Id.html#idUnfolding"><span class="hs-identifier hs-var hs-var">idUnfolding</span></a></span></span><span> </span><span id="local-6989586621680835753"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835753"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-704"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OccInfo -&gt; Bool
</span><a href="GHC.Types.Basic.html#isStrongLoopBreaker"><span class="hs-identifier hs-var">isStrongLoopBreaker</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; OccInfo
</span><a href="GHC.Types.Id.Info.html#occInfo"><span class="hs-identifier hs-var hs-var">occInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835750"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#NoUnfolding"><span class="hs-identifier hs-var">NoUnfolding</span></a></span><span>
</span><span id="line-705"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding
</span><a href="GHC.Types.Id.Info.html#unfoldingInfo"><span class="hs-identifier hs-var hs-var">unfoldingInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835750"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-706"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-707"></span><span>    </span><span id="local-6989586621680835750"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680835750"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835753"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-708"></span><span>
</span><span id="line-709"></span><span class="annot"><a href="GHC.Types.Id.html#realIdUnfolding"><span class="hs-identifier hs-type">realIdUnfolding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#Unfolding"><span class="hs-identifier hs-type">Unfolding</span></a></span><span>
</span><span id="line-710"></span><span class="hs-comment">-- Expose the unfolding if there is one, including for loop breakers</span><span>
</span><span id="line-711"></span><span id="realIdUnfolding"><span class="annot"><span class="annottext">realIdUnfolding :: Id -&gt; Unfolding
</span><a href="GHC.Types.Id.html#realIdUnfolding"><span class="hs-identifier hs-var hs-var">realIdUnfolding</span></a></span></span><span> </span><span id="local-6989586621680835747"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835747"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding
</span><a href="GHC.Types.Id.Info.html#unfoldingInfo"><span class="hs-identifier hs-var hs-var">unfoldingInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835747"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-712"></span><span>
</span><span id="line-713"></span><span class="annot"><a href="GHC.Types.Id.html#setIdUnfolding"><span class="hs-identifier hs-type">setIdUnfolding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#Unfolding"><span class="hs-identifier hs-type">Unfolding</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-714"></span><span id="setIdUnfolding"><span class="annot"><span class="annottext">setIdUnfolding :: Id -&gt; Unfolding -&gt; Id
</span><a href="GHC.Types.Id.html#setIdUnfolding"><span class="hs-identifier hs-var hs-var">setIdUnfolding</span></a></span></span><span> </span><span id="local-6989586621680835746"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835746"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835745"><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680835745"><span class="hs-identifier hs-var">unfolding</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680835745"><span class="hs-identifier hs-var">unfolding</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835746"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span class="annot"><a href="GHC.Types.Id.html#idDemandInfo"><span class="hs-identifier hs-type">idDemandInfo</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Demand.html#Demand"><span class="hs-identifier hs-type">Demand</span></a></span><span>
</span><span id="line-717"></span><span id="idDemandInfo"><span class="annot"><span class="annottext">idDemandInfo :: Id -&gt; JointDmd (Str StrDmd) (Use UseDmd)
</span><a href="GHC.Types.Id.html#idDemandInfo"><span class="hs-identifier hs-var hs-var">idDemandInfo</span></a></span></span><span>       </span><span id="local-6989586621680835742"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835742"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; JointDmd (Str StrDmd) (Use UseDmd)
</span><a href="GHC.Types.Id.Info.html#demandInfo"><span class="hs-identifier hs-var hs-var">demandInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835742"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-718"></span><span>
</span><span id="line-719"></span><span class="annot"><a href="GHC.Types.Id.html#setIdDemandInfo"><span class="hs-identifier hs-type">setIdDemandInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Demand.html#Demand"><span class="hs-identifier hs-type">Demand</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-720"></span><span id="setIdDemandInfo"><span class="annot"><span class="annottext">setIdDemandInfo :: Id -&gt; JointDmd (Str StrDmd) (Use UseDmd) -&gt; Id
</span><a href="GHC.Types.Id.html#setIdDemandInfo"><span class="hs-identifier hs-var hs-var">setIdDemandInfo</span></a></span></span><span> </span><span id="local-6989586621680835740"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835740"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835739"><span class="annot"><span class="annottext">JointDmd (Str StrDmd) (Use UseDmd)
</span><a href="#local-6989586621680835739"><span class="hs-identifier hs-var">dmd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; JointDmd (Str StrDmd) (Use UseDmd) -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setDemandInfo"><span class="hs-operator hs-var">`setDemandInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">JointDmd (Str StrDmd) (Use UseDmd)
</span><a href="#local-6989586621680835739"><span class="hs-identifier hs-var">dmd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835740"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-721"></span><span>
</span><span id="line-722"></span><span class="annot"><a href="GHC.Types.Id.html#setCaseBndrEvald"><span class="hs-identifier hs-type">setCaseBndrEvald</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-723"></span><span class="hs-comment">-- Used for variables bound by a case expressions, both the case-binder</span><span>
</span><span id="line-724"></span><span class="hs-comment">-- itself, and any pattern-bound variables that are argument of a</span><span>
</span><span id="line-725"></span><span class="hs-comment">-- strict constructor.  It just marks the variable as already-evaluated,</span><span>
</span><span id="line-726"></span><span class="hs-comment">-- so that (for example) a subsequent 'seq' can be dropped</span><span>
</span><span id="line-727"></span><span id="setCaseBndrEvald"><span class="annot"><span class="annottext">setCaseBndrEvald :: StrictnessMark -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#setCaseBndrEvald"><span class="hs-identifier hs-var hs-var">setCaseBndrEvald</span></a></span></span><span> </span><span id="local-6989586621680835737"><span class="annot"><span class="annottext">StrictnessMark
</span><a href="#local-6989586621680835737"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span id="local-6989586621680835736"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835736"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-728"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">StrictnessMark -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isMarkedStrict"><span class="hs-identifier hs-var">isMarkedStrict</span></a></span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="#local-6989586621680835737"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835736"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Unfolding -&gt; Id
</span><a href="GHC.Types.Id.html#setIdUnfolding"><span class="hs-operator hs-var">`setIdUnfolding`</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#evaldUnfolding"><span class="hs-identifier hs-var">evaldUnfolding</span></a></span><span>
</span><span id="line-729"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835736"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-730"></span><span>
</span><span id="line-731"></span><span>        </span><span class="hs-comment">---------------------------------</span><span>
</span><span id="line-732"></span><span>        </span><span class="hs-comment">-- SPECIALISATION</span><span>
</span><span id="line-733"></span><span>
</span><span id="line-734"></span><span class="hs-comment">-- See Note [Specialisations and RULES in IdInfo] in GHC.Types.Id.Info</span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span class="annot"><a href="GHC.Types.Id.html#idSpecialisation"><span class="hs-identifier hs-type">idSpecialisation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#RuleInfo"><span class="hs-identifier hs-type">RuleInfo</span></a></span><span>
</span><span id="line-737"></span><span id="idSpecialisation"><span class="annot"><span class="annottext">idSpecialisation :: Id -&gt; RuleInfo
</span><a href="GHC.Types.Id.html#idSpecialisation"><span class="hs-identifier hs-var hs-var">idSpecialisation</span></a></span></span><span> </span><span id="local-6989586621680835734"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835734"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; RuleInfo
</span><a href="GHC.Types.Id.Info.html#ruleInfo"><span class="hs-identifier hs-var hs-var">ruleInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835734"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-738"></span><span>
</span><span id="line-739"></span><span class="annot"><a href="GHC.Types.Id.html#idCoreRules"><span class="hs-identifier hs-type">idCoreRules</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-740"></span><span id="idCoreRules"><span class="annot"><span class="annottext">idCoreRules :: Id -&gt; [CoreRule]
</span><a href="GHC.Types.Id.html#idCoreRules"><span class="hs-identifier hs-var hs-var">idCoreRules</span></a></span></span><span> </span><span id="local-6989586621680835732"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835732"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleInfo -&gt; [CoreRule]
</span><a href="GHC.Types.Id.Info.html#ruleInfoRules"><span class="hs-identifier hs-var">ruleInfoRules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; RuleInfo
</span><a href="GHC.Types.Id.html#idSpecialisation"><span class="hs-identifier hs-var">idSpecialisation</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835732"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-741"></span><span>
</span><span id="line-742"></span><span class="annot"><a href="GHC.Types.Id.html#idHasRules"><span class="hs-identifier hs-type">idHasRules</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-743"></span><span id="idHasRules"><span class="annot"><span class="annottext">idHasRules :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#idHasRules"><span class="hs-identifier hs-var hs-var">idHasRules</span></a></span></span><span> </span><span id="local-6989586621680835730"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835730"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RuleInfo -&gt; Bool
</span><a href="GHC.Types.Id.Info.html#isEmptyRuleInfo"><span class="hs-identifier hs-var">isEmptyRuleInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; RuleInfo
</span><a href="GHC.Types.Id.html#idSpecialisation"><span class="hs-identifier hs-var">idSpecialisation</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835730"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-744"></span><span>
</span><span id="line-745"></span><span class="annot"><a href="GHC.Types.Id.html#setIdSpecialisation"><span class="hs-identifier hs-type">setIdSpecialisation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#RuleInfo"><span class="hs-identifier hs-type">RuleInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-746"></span><span id="setIdSpecialisation"><span class="annot"><span class="annottext">setIdSpecialisation :: Id -&gt; RuleInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdSpecialisation"><span class="hs-identifier hs-var hs-var">setIdSpecialisation</span></a></span></span><span> </span><span id="local-6989586621680835728"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835728"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835727"><span class="annot"><span class="annottext">RuleInfo
</span><a href="#local-6989586621680835727"><span class="hs-identifier hs-var">spec_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; RuleInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setRuleInfo"><span class="hs-operator hs-var">`setRuleInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">RuleInfo
</span><a href="#local-6989586621680835727"><span class="hs-identifier hs-var">spec_info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835728"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-747"></span><span>
</span><span id="line-748"></span><span>        </span><span class="hs-comment">---------------------------------</span><span>
</span><span id="line-749"></span><span>        </span><span class="hs-comment">-- CAF INFO</span><span>
</span><span id="line-750"></span><span class="annot"><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier hs-type">idCafInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#CafInfo"><span class="hs-identifier hs-type">CafInfo</span></a></span><span>
</span><span id="line-751"></span><span id="idCafInfo"><span class="annot"><span class="annottext">idCafInfo :: Id -&gt; CafInfo
</span><a href="GHC.Types.Id.html#idCafInfo"><span class="hs-identifier hs-var hs-var">idCafInfo</span></a></span></span><span> </span><span id="local-6989586621680835725"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835725"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; CafInfo
</span><a href="GHC.Types.Id.Info.html#cafInfo"><span class="hs-identifier hs-var">cafInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835725"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-752"></span><span>
</span><span id="line-753"></span><span class="annot"><a href="GHC.Types.Id.html#setIdCafInfo"><span class="hs-identifier hs-type">setIdCafInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#CafInfo"><span class="hs-identifier hs-type">CafInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-754"></span><span id="setIdCafInfo"><span class="annot"><span class="annottext">setIdCafInfo :: Id -&gt; CafInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdCafInfo"><span class="hs-identifier hs-var hs-var">setIdCafInfo</span></a></span></span><span> </span><span id="local-6989586621680835723"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835723"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835722"><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621680835722"><span class="hs-identifier hs-var">caf_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; CafInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCafInfo"><span class="hs-operator hs-var">`setCafInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">CafInfo
</span><a href="#local-6989586621680835722"><span class="hs-identifier hs-var">caf_info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835723"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-755"></span><span>
</span><span id="line-756"></span><span>        </span><span class="hs-comment">---------------------------------</span><span>
</span><span id="line-757"></span><span>        </span><span class="hs-comment">-- Lambda form info</span><span>
</span><span id="line-758"></span><span>
</span><span id="line-759"></span><span class="annot"><a href="GHC.Types.Id.html#idLFInfo_maybe"><span class="hs-identifier hs-type">idLFInfo_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span>
</span><span id="line-760"></span><span id="idLFInfo_maybe"><span class="annot"><span class="annottext">idLFInfo_maybe :: Id -&gt; Maybe LambdaFormInfo
</span><a href="GHC.Types.Id.html#idLFInfo_maybe"><span class="hs-identifier hs-var hs-var">idLFInfo_maybe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe LambdaFormInfo
</span><a href="GHC.Types.Id.Info.html#lfInfo"><span class="hs-identifier hs-var hs-var">lfInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe LambdaFormInfo)
-&gt; (Id -&gt; IdInfo) -&gt; Id -&gt; Maybe LambdaFormInfo
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span>
</span><span id="line-761"></span><span>
</span><span id="line-762"></span><span class="annot"><a href="GHC.Types.Id.html#setIdLFInfo"><span class="hs-identifier hs-type">setIdLFInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-763"></span><span id="setIdLFInfo"><span class="annot"><span class="annottext">setIdLFInfo :: Id -&gt; LambdaFormInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdLFInfo"><span class="hs-identifier hs-var hs-var">setIdLFInfo</span></a></span></span><span> </span><span id="local-6989586621680835718"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835718"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835717"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621680835717"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; LambdaFormInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLFInfo"><span class="hs-operator hs-var">`setLFInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621680835717"><span class="hs-identifier hs-var">lf</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835718"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-764"></span><span>
</span><span id="line-765"></span><span>        </span><span class="hs-comment">---------------------------------</span><span>
</span><span id="line-766"></span><span>        </span><span class="hs-comment">-- Occurrence INFO</span><span>
</span><span id="line-767"></span><span class="annot"><a href="GHC.Types.Id.html#idOccInfo"><span class="hs-identifier hs-type">idOccInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OccInfo"><span class="hs-identifier hs-type">OccInfo</span></a></span><span>
</span><span id="line-768"></span><span id="idOccInfo"><span class="annot"><span class="annottext">idOccInfo :: Id -&gt; OccInfo
</span><a href="GHC.Types.Id.html#idOccInfo"><span class="hs-identifier hs-var hs-var">idOccInfo</span></a></span></span><span> </span><span id="local-6989586621680835715"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835715"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; OccInfo
</span><a href="GHC.Types.Id.Info.html#occInfo"><span class="hs-identifier hs-var hs-var">occInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835715"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-769"></span><span>
</span><span id="line-770"></span><span class="annot"><a href="GHC.Types.Id.html#setIdOccInfo"><span class="hs-identifier hs-type">setIdOccInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OccInfo"><span class="hs-identifier hs-type">OccInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-771"></span><span id="setIdOccInfo"><span class="annot"><span class="annottext">setIdOccInfo :: Id -&gt; OccInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdOccInfo"><span class="hs-identifier hs-var hs-var">setIdOccInfo</span></a></span></span><span> </span><span id="local-6989586621680835714"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835714"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835713"><span class="annot"><span class="annottext">OccInfo
</span><a href="#local-6989586621680835713"><span class="hs-identifier hs-var">occ_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; OccInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setOccInfo"><span class="hs-operator hs-var">`setOccInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">OccInfo
</span><a href="#local-6989586621680835713"><span class="hs-identifier hs-var">occ_info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835714"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-772"></span><span>
</span><span id="line-773"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdOccInfo"><span class="hs-identifier hs-type">zapIdOccInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-774"></span><span id="zapIdOccInfo"><span class="annot"><span class="annottext">zapIdOccInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdOccInfo"><span class="hs-identifier hs-var hs-var">zapIdOccInfo</span></a></span></span><span> </span><span id="local-6989586621680835711"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835711"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835711"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; OccInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdOccInfo"><span class="hs-operator hs-var">`setIdOccInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">OccInfo
</span><a href="GHC.Types.Basic.html#noOccInfo"><span class="hs-identifier hs-var">noOccInfo</span></a></span><span>
</span><span id="line-775"></span><span>
</span><span id="line-776"></span><span class="hs-comment">{-
        ---------------------------------
        -- INLINING
The inline pragma tells us to be very keen to inline this Id, but it's still
OK not to if optimisation is switched off.
-}</span><span>
</span><span id="line-782"></span><span>
</span><span id="line-783"></span><span class="annot"><a href="GHC.Types.Id.html#idInlinePragma"><span class="hs-identifier hs-type">idInlinePragma</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#InlinePragma"><span class="hs-identifier hs-type">InlinePragma</span></a></span><span>
</span><span id="line-784"></span><span id="idInlinePragma"><span class="annot"><span class="annottext">idInlinePragma :: Id -&gt; InlinePragma
</span><a href="GHC.Types.Id.html#idInlinePragma"><span class="hs-identifier hs-var hs-var">idInlinePragma</span></a></span></span><span> </span><span id="local-6989586621680835709"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835709"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma
</span><a href="GHC.Types.Id.Info.html#inlinePragInfo"><span class="hs-identifier hs-var hs-var">inlinePragInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835709"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-785"></span><span>
</span><span id="line-786"></span><span class="annot"><a href="GHC.Types.Id.html#setInlinePragma"><span class="hs-identifier hs-type">setInlinePragma</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#InlinePragma"><span class="hs-identifier hs-type">InlinePragma</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-787"></span><span id="setInlinePragma"><span class="annot"><span class="annottext">setInlinePragma :: Id -&gt; InlinePragma -&gt; Id
</span><a href="GHC.Types.Id.html#setInlinePragma"><span class="hs-identifier hs-var hs-var">setInlinePragma</span></a></span></span><span> </span><span id="local-6989586621680835707"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835707"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835706"><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680835706"><span class="hs-identifier hs-var">prag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680835706"><span class="hs-identifier hs-var">prag</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835707"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-788"></span><span>
</span><span id="line-789"></span><span class="annot"><a href="GHC.Types.Id.html#modifyInlinePragma"><span class="hs-identifier hs-type">modifyInlinePragma</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#InlinePragma"><span class="hs-identifier hs-type">InlinePragma</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#InlinePragma"><span class="hs-identifier hs-type">InlinePragma</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-790"></span><span id="modifyInlinePragma"><span class="annot"><span class="annottext">modifyInlinePragma :: Id -&gt; (InlinePragma -&gt; InlinePragma) -&gt; Id
</span><a href="GHC.Types.Id.html#modifyInlinePragma"><span class="hs-identifier hs-var hs-var">modifyInlinePragma</span></a></span></span><span> </span><span id="local-6989586621680835704"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835704"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835703"><span class="annot"><span class="annottext">InlinePragma -&gt; InlinePragma
</span><a href="#local-6989586621680835703"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680835702"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835702"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835702"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InlinePragma -&gt; InlinePragma
</span><a href="#local-6989586621680835703"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma
</span><a href="GHC.Types.Id.Info.html#inlinePragInfo"><span class="hs-identifier hs-var hs-var">inlinePragInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835702"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835704"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-791"></span><span>
</span><span id="line-792"></span><span class="annot"><a href="GHC.Types.Id.html#idInlineActivation"><span class="hs-identifier hs-type">idInlineActivation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Activation"><span class="hs-identifier hs-type">Activation</span></a></span><span>
</span><span id="line-793"></span><span id="idInlineActivation"><span class="annot"><span class="annottext">idInlineActivation :: Id -&gt; Activation
</span><a href="GHC.Types.Id.html#idInlineActivation"><span class="hs-identifier hs-var hs-var">idInlineActivation</span></a></span></span><span> </span><span id="local-6989586621680835701"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835701"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlinePragma -&gt; Activation
</span><a href="GHC.Types.Basic.html#inlinePragmaActivation"><span class="hs-identifier hs-var">inlinePragmaActivation</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; InlinePragma
</span><a href="GHC.Types.Id.html#idInlinePragma"><span class="hs-identifier hs-var">idInlinePragma</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835701"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-794"></span><span>
</span><span id="line-795"></span><span class="annot"><a href="GHC.Types.Id.html#setInlineActivation"><span class="hs-identifier hs-type">setInlineActivation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Activation"><span class="hs-identifier hs-type">Activation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-796"></span><span id="setInlineActivation"><span class="annot"><span class="annottext">setInlineActivation :: Id -&gt; Activation -&gt; Id
</span><a href="GHC.Types.Id.html#setInlineActivation"><span class="hs-identifier hs-var hs-var">setInlineActivation</span></a></span></span><span> </span><span id="local-6989586621680835699"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835699"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835698"><span class="annot"><span class="annottext">Activation
</span><a href="#local-6989586621680835698"><span class="hs-identifier hs-var">act</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; (InlinePragma -&gt; InlinePragma) -&gt; Id
</span><a href="GHC.Types.Id.html#modifyInlinePragma"><span class="hs-identifier hs-var">modifyInlinePragma</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835699"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680835697"><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680835697"><span class="hs-identifier hs-var">prag</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InlinePragma -&gt; Activation -&gt; InlinePragma
</span><a href="GHC.Types.Basic.html#setInlinePragmaActivation"><span class="hs-identifier hs-var">setInlinePragmaActivation</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680835697"><span class="hs-identifier hs-var">prag</span></a></span><span> </span><span class="annot"><span class="annottext">Activation
</span><a href="#local-6989586621680835698"><span class="hs-identifier hs-var">act</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-797"></span><span>
</span><span id="line-798"></span><span class="annot"><a href="GHC.Types.Id.html#idRuleMatchInfo"><span class="hs-identifier hs-type">idRuleMatchInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RuleMatchInfo"><span class="hs-identifier hs-type">RuleMatchInfo</span></a></span><span>
</span><span id="line-799"></span><span id="idRuleMatchInfo"><span class="annot"><span class="annottext">idRuleMatchInfo :: Id -&gt; RuleMatchInfo
</span><a href="GHC.Types.Id.html#idRuleMatchInfo"><span class="hs-identifier hs-var hs-var">idRuleMatchInfo</span></a></span></span><span> </span><span id="local-6989586621680835695"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835695"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlinePragma -&gt; RuleMatchInfo
</span><a href="GHC.Types.Basic.html#inlinePragmaRuleMatchInfo"><span class="hs-identifier hs-var">inlinePragmaRuleMatchInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; InlinePragma
</span><a href="GHC.Types.Id.html#idInlinePragma"><span class="hs-identifier hs-var">idInlinePragma</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835695"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span>
</span><span id="line-801"></span><span class="annot"><a href="GHC.Types.Id.html#isConLikeId"><span class="hs-identifier hs-type">isConLikeId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-802"></span><span id="isConLikeId"><span class="annot"><span class="annottext">isConLikeId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isConLikeId"><span class="hs-identifier hs-var hs-var">isConLikeId</span></a></span></span><span> </span><span id="local-6989586621680835693"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835693"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleMatchInfo -&gt; Bool
</span><a href="GHC.Types.Basic.html#isConLike"><span class="hs-identifier hs-var">isConLike</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; RuleMatchInfo
</span><a href="GHC.Types.Id.html#idRuleMatchInfo"><span class="hs-identifier hs-var">idRuleMatchInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835693"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-803"></span><span>
</span><span id="line-804"></span><span class="hs-comment">{-
        ---------------------------------
        -- ONE-SHOT LAMBDAS
-}</span><span>
</span><span id="line-808"></span><span>
</span><span id="line-809"></span><span class="annot"><a href="GHC.Types.Id.html#idOneShotInfo"><span class="hs-identifier hs-type">idOneShotInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OneShotInfo"><span class="hs-identifier hs-type">OneShotInfo</span></a></span><span>
</span><span id="line-810"></span><span id="idOneShotInfo"><span class="annot"><span class="annottext">idOneShotInfo :: Id -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#idOneShotInfo"><span class="hs-identifier hs-var hs-var">idOneShotInfo</span></a></span></span><span> </span><span id="local-6989586621680835691"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835691"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; OneShotInfo
</span><a href="GHC.Types.Id.Info.html#oneShotInfo"><span class="hs-identifier hs-var">oneShotInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835691"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-811"></span><span>
</span><span id="line-812"></span><span class="hs-comment">-- | Like 'idOneShotInfo', but taking the Horrible State Hack in to account</span><span>
</span><span id="line-813"></span><span class="hs-comment">-- See Note [The state-transformer hack] in &quot;GHC.Core.Opt.Arity&quot;</span><span>
</span><span id="line-814"></span><span class="annot"><a href="GHC.Types.Id.html#idStateHackOneShotInfo"><span class="hs-identifier hs-type">idStateHackOneShotInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OneShotInfo"><span class="hs-identifier hs-type">OneShotInfo</span></a></span><span>
</span><span id="line-815"></span><span id="idStateHackOneShotInfo"><span class="annot"><span class="annottext">idStateHackOneShotInfo :: Id -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#idStateHackOneShotInfo"><span class="hs-identifier hs-var hs-var">idStateHackOneShotInfo</span></a></span></span><span> </span><span id="local-6989586621680835689"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835689"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-816"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Bool
</span><a href="GHC.Types.Id.html#isStateHackType"><span class="hs-identifier hs-var">isStateHackType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Kind
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835689"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Id.html#stateHackOneShot"><span class="hs-identifier hs-var">stateHackOneShot</span></a></span><span>
</span><span id="line-817"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#idOneShotInfo"><span class="hs-identifier hs-var">idOneShotInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835689"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-818"></span><span>
</span><span id="line-819"></span><span class="hs-comment">-- | Returns whether the lambda associated with the 'Id' is certainly applied at most once</span><span>
</span><span id="line-820"></span><span class="hs-comment">-- This one is the &quot;business end&quot;, called externally.</span><span>
</span><span id="line-821"></span><span class="hs-comment">-- It works on type variables as well as Ids, returning True</span><span>
</span><span id="line-822"></span><span class="hs-comment">-- Its main purpose is to encapsulate the Horrible State Hack</span><span>
</span><span id="line-823"></span><span class="hs-comment">-- See Note [The state-transformer hack] in &quot;GHC.Core.Opt.Arity&quot;</span><span>
</span><span id="line-824"></span><span class="annot"><a href="GHC.Types.Id.html#isOneShotBndr"><span class="hs-identifier hs-type">isOneShotBndr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-825"></span><span id="isOneShotBndr"><span class="annot"><span class="annottext">isOneShotBndr :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isOneShotBndr"><span class="hs-identifier hs-var hs-var">isOneShotBndr</span></a></span></span><span> </span><span id="local-6989586621680835688"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835688"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-826"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isTyVar"><span class="hs-identifier hs-var">isTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835688"><span class="hs-identifier hs-var">var</span></a></span><span>                              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-827"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#OneShotLam"><span class="hs-identifier hs-var">OneShotLam</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#idStateHackOneShotInfo"><span class="hs-identifier hs-var">idStateHackOneShotInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835688"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-828"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-829"></span><span>
</span><span id="line-830"></span><span class="hs-comment">-- | Should we apply the state hack to values of this 'Type'?</span><span>
</span><span id="line-831"></span><span class="annot"><a href="GHC.Types.Id.html#stateHackOneShot"><span class="hs-identifier hs-type">stateHackOneShot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OneShotInfo"><span class="hs-identifier hs-type">OneShotInfo</span></a></span><span>
</span><span id="line-832"></span><span id="stateHackOneShot"><span class="annot"><span class="annottext">stateHackOneShot :: OneShotInfo
</span><a href="GHC.Types.Id.html#stateHackOneShot"><span class="hs-identifier hs-var hs-var">stateHackOneShot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#OneShotLam"><span class="hs-identifier hs-var">OneShotLam</span></a></span><span>
</span><span id="line-833"></span><span>
</span><span id="line-834"></span><span class="annot"><a href="GHC.Types.Id.html#typeOneShot"><span class="hs-identifier hs-type">typeOneShot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OneShotInfo"><span class="hs-identifier hs-type">OneShotInfo</span></a></span><span>
</span><span id="line-835"></span><span id="typeOneShot"><span class="annot"><span class="annottext">typeOneShot :: Kind -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#typeOneShot"><span class="hs-identifier hs-var hs-var">typeOneShot</span></a></span></span><span> </span><span id="local-6989586621680835685"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835685"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-836"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Bool
</span><a href="GHC.Types.Id.html#isStateHackType"><span class="hs-identifier hs-var">isStateHackType</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835685"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Id.html#stateHackOneShot"><span class="hs-identifier hs-var">stateHackOneShot</span></a></span><span>
</span><span id="line-837"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#NoOneShotInfo"><span class="hs-identifier hs-var">NoOneShotInfo</span></a></span><span>
</span><span id="line-838"></span><span>
</span><span id="line-839"></span><span class="annot"><a href="GHC.Types.Id.html#isStateHackType"><span class="hs-identifier hs-type">isStateHackType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-840"></span><span id="isStateHackType"><span class="annot"><span class="annottext">isStateHackType :: Kind -&gt; Bool
</span><a href="GHC.Types.Id.html#isStateHackType"><span class="hs-identifier hs-var hs-var">isStateHackType</span></a></span></span><span> </span><span id="local-6989586621680835683"><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835683"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-841"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#hasNoStateHack"><span class="hs-identifier hs-var">hasNoStateHack</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="GHC.Driver.Session.html#unsafeGlobalDynFlags"><span class="hs-identifier hs-var">unsafeGlobalDynFlags</span></a></span><span>
</span><span id="line-842"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-843"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-844"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Kind -&gt; Maybe TyCon
</span><a href="GHC.Core.Type.html#tyConAppTyCon_maybe"><span class="hs-identifier hs-var">tyConAppTyCon_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Kind
</span><a href="#local-6989586621680835683"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-845"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680835679"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680835679"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680835679"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; TyCon -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#statePrimTyCon"><span class="hs-identifier hs-var">statePrimTyCon</span></a></span><span>
</span><span id="line-846"></span><span>        </span><span class="annot"><span class="annottext">Maybe TyCon
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-847"></span><span>        </span><span class="hs-comment">-- This is a gross hack.  It claims that</span><span>
</span><span id="line-848"></span><span>        </span><span class="hs-comment">-- every function over realWorldStatePrimTy is a one-shot</span><span>
</span><span id="line-849"></span><span>        </span><span class="hs-comment">-- function.  This is pretty true in practice, and makes a big</span><span>
</span><span id="line-850"></span><span>        </span><span class="hs-comment">-- difference.  For example, consider</span><span>
</span><span id="line-851"></span><span>        </span><span class="hs-comment">--      a `thenST` \ r -&gt; ...E...</span><span>
</span><span id="line-852"></span><span>        </span><span class="hs-comment">-- The early full laziness pass, if it doesn't know that r is one-shot</span><span>
</span><span id="line-853"></span><span>        </span><span class="hs-comment">-- will pull out E (let's say it doesn't mention r) to give</span><span>
</span><span id="line-854"></span><span>        </span><span class="hs-comment">--      let lvl = E in a `thenST` \ r -&gt; ...lvl...</span><span>
</span><span id="line-855"></span><span>        </span><span class="hs-comment">-- When `thenST` gets inlined, we end up with</span><span>
</span><span id="line-856"></span><span>        </span><span class="hs-comment">--      let lvl = E in \s -&gt; case a s of (r, s') -&gt; ...lvl...</span><span>
</span><span id="line-857"></span><span>        </span><span class="hs-comment">-- and we don't re-inline E.</span><span>
</span><span id="line-858"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-859"></span><span>        </span><span class="hs-comment">-- It would be better to spot that r was one-shot to start with, but</span><span>
</span><span id="line-860"></span><span>        </span><span class="hs-comment">-- I don't want to rely on that.</span><span>
</span><span id="line-861"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-862"></span><span>        </span><span class="hs-comment">-- Another good example is in fill_in in PrelPack.hs.  We should be able to</span><span>
</span><span id="line-863"></span><span>        </span><span class="hs-comment">-- spot that fill_in has arity 2 (and when Keith is done, we will) but we can't yet.</span><span>
</span><span id="line-864"></span><span>
</span><span id="line-865"></span><span class="annot"><a href="GHC.Types.Id.html#isProbablyOneShotLambda"><span class="hs-identifier hs-type">isProbablyOneShotLambda</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-866"></span><span id="isProbablyOneShotLambda"><span class="annot"><span class="annottext">isProbablyOneShotLambda :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isProbablyOneShotLambda"><span class="hs-identifier hs-var hs-var">isProbablyOneShotLambda</span></a></span></span><span> </span><span id="local-6989586621680835677"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835677"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Id -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#idStateHackOneShotInfo"><span class="hs-identifier hs-var">idStateHackOneShotInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835677"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-867"></span><span>                               </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#OneShotLam"><span class="hs-identifier hs-var">OneShotLam</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-868"></span><span>                               </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#NoOneShotInfo"><span class="hs-identifier hs-var">NoOneShotInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-869"></span><span>
</span><span id="line-870"></span><span class="annot"><a href="GHC.Types.Id.html#setOneShotLambda"><span class="hs-identifier hs-type">setOneShotLambda</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-871"></span><span id="setOneShotLambda"><span class="annot"><span class="annottext">setOneShotLambda :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#setOneShotLambda"><span class="hs-identifier hs-var hs-var">setOneShotLambda</span></a></span></span><span> </span><span id="local-6989586621680835676"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835676"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; OneShotInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setOneShotInfo"><span class="hs-operator hs-var">`setOneShotInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#OneShotLam"><span class="hs-identifier hs-var">OneShotLam</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835676"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-872"></span><span>
</span><span id="line-873"></span><span class="annot"><a href="GHC.Types.Id.html#clearOneShotLambda"><span class="hs-identifier hs-type">clearOneShotLambda</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-874"></span><span id="clearOneShotLambda"><span class="annot"><span class="annottext">clearOneShotLambda :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#clearOneShotLambda"><span class="hs-identifier hs-var hs-var">clearOneShotLambda</span></a></span></span><span> </span><span id="local-6989586621680835674"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835674"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; OneShotInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setOneShotInfo"><span class="hs-operator hs-var">`setOneShotInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#NoOneShotInfo"><span class="hs-identifier hs-var">NoOneShotInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835674"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-875"></span><span>
</span><span id="line-876"></span><span class="annot"><a href="GHC.Types.Id.html#setIdOneShotInfo"><span class="hs-identifier hs-type">setIdOneShotInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OneShotInfo"><span class="hs-identifier hs-type">OneShotInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-877"></span><span id="setIdOneShotInfo"><span class="annot"><span class="annottext">setIdOneShotInfo :: Id -&gt; OneShotInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdOneShotInfo"><span class="hs-identifier hs-var hs-var">setIdOneShotInfo</span></a></span></span><span> </span><span id="local-6989586621680835673"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835673"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835672"><span class="annot"><span class="annottext">OneShotInfo
</span><a href="#local-6989586621680835672"><span class="hs-identifier hs-var">one_shot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; OneShotInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setOneShotInfo"><span class="hs-operator hs-var">`setOneShotInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="#local-6989586621680835672"><span class="hs-identifier hs-var">one_shot</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835673"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-878"></span><span>
</span><span id="line-879"></span><span class="annot"><a href="GHC.Types.Id.html#updOneShotInfo"><span class="hs-identifier hs-type">updOneShotInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#OneShotInfo"><span class="hs-identifier hs-type">OneShotInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-880"></span><span class="hs-comment">-- Combine the info in the Id with new info</span><span>
</span><span id="line-881"></span><span id="updOneShotInfo"><span class="annot"><span class="annottext">updOneShotInfo :: Id -&gt; OneShotInfo -&gt; Id
</span><a href="GHC.Types.Id.html#updOneShotInfo"><span class="hs-identifier hs-var hs-var">updOneShotInfo</span></a></span></span><span> </span><span id="local-6989586621680835671"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835671"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680835670"><span class="annot"><span class="annottext">OneShotInfo
</span><a href="#local-6989586621680835670"><span class="hs-identifier hs-var">one_shot</span></a></span></span><span>
</span><span id="line-882"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680835669"><span class="hs-identifier hs-var">do_upd</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; OneShotInfo -&gt; Id
</span><a href="GHC.Types.Id.html#setIdOneShotInfo"><span class="hs-identifier hs-var">setIdOneShotInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835671"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="#local-6989586621680835670"><span class="hs-identifier hs-var">one_shot</span></a></span><span>
</span><span id="line-883"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835671"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-884"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-885"></span><span>    </span><span id="local-6989586621680835669"><span class="annot"><span class="annottext">do_upd :: Bool
</span><a href="#local-6989586621680835669"><span class="hs-identifier hs-var hs-var">do_upd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; OneShotInfo
</span><a href="GHC.Types.Id.html#idOneShotInfo"><span class="hs-identifier hs-var">idOneShotInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835671"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="#local-6989586621680835670"><span class="hs-identifier hs-var">one_shot</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-886"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#NoOneShotInfo"><span class="hs-identifier hs-var">NoOneShotInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">OneShotInfo
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-887"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Basic.html#OneShotLam"><span class="hs-identifier hs-var">OneShotLam</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">OneShotInfo
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-888"></span><span>
</span><span id="line-889"></span><span class="hs-comment">-- The OneShotLambda functions simply fiddle with the IdInfo flag</span><span>
</span><span id="line-890"></span><span class="hs-comment">-- But watch out: this may change the type of something else</span><span>
</span><span id="line-891"></span><span class="hs-comment">--      f = \x -&gt; e</span><span>
</span><span id="line-892"></span><span class="hs-comment">-- If we change the one-shot-ness of x, f's type changes</span><span>
</span><span id="line-893"></span><span>
</span><span id="line-894"></span><span class="annot"><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-type">zapInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-895"></span><span id="zapInfo"><span class="annot"><span class="annottext">zapInfo :: (IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var hs-var">zapInfo</span></a></span></span><span> </span><span id="local-6989586621680835667"><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="#local-6989586621680835667"><span class="hs-identifier hs-var">zapper</span></a></span></span><span> </span><span id="local-6989586621680835666"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835666"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe IdInfo -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#maybeModifyIdInfo"><span class="hs-identifier hs-var">maybeModifyIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="#local-6989586621680835667"><span class="hs-identifier hs-var">zapper</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835666"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835666"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-896"></span><span>
</span><span id="line-897"></span><span class="annot"><a href="GHC.Types.Id.html#zapLamIdInfo"><span class="hs-identifier hs-type">zapLamIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-898"></span><span id="zapLamIdInfo"><span class="annot"><span class="annottext">zapLamIdInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapLamIdInfo"><span class="hs-identifier hs-var hs-var">zapLamIdInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapLamInfo"><span class="hs-identifier hs-var">zapLamInfo</span></a></span><span>
</span><span id="line-899"></span><span>
</span><span id="line-900"></span><span class="annot"><a href="GHC.Types.Id.html#zapFragileIdInfo"><span class="hs-identifier hs-type">zapFragileIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-901"></span><span id="zapFragileIdInfo"><span class="annot"><span class="annottext">zapFragileIdInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapFragileIdInfo"><span class="hs-identifier hs-var hs-var">zapFragileIdInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapFragileInfo"><span class="hs-identifier hs-var">zapFragileInfo</span></a></span><span>
</span><span id="line-902"></span><span>
</span><span id="line-903"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdDemandInfo"><span class="hs-identifier hs-type">zapIdDemandInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-904"></span><span id="zapIdDemandInfo"><span class="annot"><span class="annottext">zapIdDemandInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdDemandInfo"><span class="hs-identifier hs-var hs-var">zapIdDemandInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapDemandInfo"><span class="hs-identifier hs-var">zapDemandInfo</span></a></span><span>
</span><span id="line-905"></span><span>
</span><span id="line-906"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdUsageInfo"><span class="hs-identifier hs-type">zapIdUsageInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-907"></span><span id="zapIdUsageInfo"><span class="annot"><span class="annottext">zapIdUsageInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdUsageInfo"><span class="hs-identifier hs-var hs-var">zapIdUsageInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapUsageInfo"><span class="hs-identifier hs-var">zapUsageInfo</span></a></span><span>
</span><span id="line-908"></span><span>
</span><span id="line-909"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdUsageEnvInfo"><span class="hs-identifier hs-type">zapIdUsageEnvInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-910"></span><span id="zapIdUsageEnvInfo"><span class="annot"><span class="annottext">zapIdUsageEnvInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdUsageEnvInfo"><span class="hs-identifier hs-var hs-var">zapIdUsageEnvInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapUsageEnvInfo"><span class="hs-identifier hs-var">zapUsageEnvInfo</span></a></span><span>
</span><span id="line-911"></span><span>
</span><span id="line-912"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdUsedOnceInfo"><span class="hs-identifier hs-type">zapIdUsedOnceInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-913"></span><span id="zapIdUsedOnceInfo"><span class="annot"><span class="annottext">zapIdUsedOnceInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdUsedOnceInfo"><span class="hs-identifier hs-var hs-var">zapIdUsedOnceInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapUsedOnceInfo"><span class="hs-identifier hs-var">zapUsedOnceInfo</span></a></span><span>
</span><span id="line-914"></span><span>
</span><span id="line-915"></span><span class="annot"><a href="GHC.Types.Id.html#zapIdTailCallInfo"><span class="hs-identifier hs-type">zapIdTailCallInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-916"></span><span id="zapIdTailCallInfo"><span class="annot"><span class="annottext">zapIdTailCallInfo :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapIdTailCallInfo"><span class="hs-identifier hs-var hs-var">zapIdTailCallInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Maybe IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapInfo"><span class="hs-identifier hs-var">zapInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Maybe IdInfo
</span><a href="GHC.Types.Id.Info.html#zapTailCallInfo"><span class="hs-identifier hs-var">zapTailCallInfo</span></a></span><span>
</span><span id="line-917"></span><span>
</span><span id="line-918"></span><span class="annot"><a href="GHC.Types.Id.html#zapStableUnfolding"><span class="hs-identifier hs-type">zapStableUnfolding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-919"></span><span id="zapStableUnfolding"><span class="annot"><span class="annottext">zapStableUnfolding :: Id -&gt; Id
</span><a href="GHC.Types.Id.html#zapStableUnfolding"><span class="hs-identifier hs-var hs-var">zapStableUnfolding</span></a></span></span><span> </span><span id="local-6989586621680835658"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835658"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-920"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Unfolding -&gt; Bool
</span><a href="GHC.Core.html#isStableUnfolding"><span class="hs-identifier hs-var">isStableUnfolding</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Unfolding
</span><a href="GHC.Types.Id.html#realIdUnfolding"><span class="hs-identifier hs-var">realIdUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835658"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Unfolding -&gt; Id
</span><a href="GHC.Types.Id.html#setIdUnfolding"><span class="hs-identifier hs-var">setIdUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835658"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#NoUnfolding"><span class="hs-identifier hs-var">NoUnfolding</span></a></span><span>
</span><span id="line-921"></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835658"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-922"></span><span>
</span><span id="line-923"></span><span class="hs-comment">{-
Note [transferPolyIdInfo]
~~~~~~~~~~~~~~~~~~~~~~~~~
This transfer is used in three places:
        FloatOut (long-distance let-floating)
        GHC.Core.Opt.Simplify.Utils.abstractFloats (short-distance let-floating)
        StgLiftLams (selectively lambda-lift local functions to top-level)

Consider the short-distance let-floating:

   f = /\a. let g = rhs in ...

Then if we float thus

   g' = /\a. rhs
   f = /\a. ...[g' a/g]....

we *do not* want to lose g's
  * strictness information
  * arity
  * inline pragma (though that is bit more debatable)
  * occurrence info

Mostly this is just an optimisation, but it's *vital* to
transfer the occurrence info.  Consider

   NonRec { f = /\a. let Rec { g* = ..g.. } in ... }

where the '*' means 'LoopBreaker'.  Then if we float we must get

   Rec { g'* = /\a. ...(g' a)... }
   NonRec { f = /\a. ...[g' a/g]....}

where g' is also marked as LoopBreaker.  If not, terrible things
can happen if we re-simplify the binding (and the Simplifier does
sometimes simplify a term twice); see #4345.

It's not so simple to retain
  * worker info
  * rules
so we simply discard those.  Sooner or later this may bite us.

If we abstract wrt one or more *value* binders, we must modify the
arity and strictness info before transferring it.  E.g.
      f = \x. e
--&gt;
      g' = \y. \x. e
      + substitute (g' y) for g
Notice that g' has an arity one more than the original g
-}</span><span>
</span><span id="line-973"></span><span>
</span><span id="line-974"></span><span class="annot"><a href="GHC.Types.Id.html#transferPolyIdInfo"><span class="hs-identifier hs-type">transferPolyIdInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>        </span><span class="hs-comment">-- Original Id</span><span>
</span><span id="line-975"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span>     </span><span class="hs-comment">-- Abstract wrt these variables</span><span>
</span><span id="line-976"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>        </span><span class="hs-comment">-- New Id</span><span>
</span><span id="line-977"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-978"></span><span id="transferPolyIdInfo"><span class="annot"><span class="annottext">transferPolyIdInfo :: Id -&gt; [Id] -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#transferPolyIdInfo"><span class="hs-identifier hs-var hs-var">transferPolyIdInfo</span></a></span></span><span> </span><span id="local-6989586621680835657"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835657"><span class="hs-identifier hs-var">old_id</span></a></span></span><span> </span><span id="local-6989586621680835656"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680835656"><span class="hs-identifier hs-var">abstract_wrt</span></a></span></span><span> </span><span id="local-6989586621680835655"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835655"><span class="hs-identifier hs-var">new_id</span></a></span></span><span>
</span><span id="line-979"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; (IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
(IdInfo -&gt; IdInfo) -&gt; Id -&gt; Id
</span><a href="GHC.Types.Id.html#modifyIdInfo"><span class="hs-identifier hs-var">modifyIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; IdInfo
</span><a href="#local-6989586621680835654"><span class="hs-identifier hs-var">transfer</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835655"><span class="hs-identifier hs-var">new_id</span></a></span><span>
</span><span id="line-980"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-981"></span><span>    </span><span id="local-6989586621680835653"><span class="annot"><span class="annottext">arity_increase :: Int
</span><a href="#local-6989586621680835653"><span class="hs-identifier hs-var hs-var">arity_increase</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Bool) -&gt; [Id] -&gt; Int
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Int
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621680835656"><span class="hs-identifier hs-var">abstract_wrt</span></a></span><span>    </span><span class="hs-comment">-- Arity increases by the</span><span>
</span><span id="line-982"></span><span>                                                </span><span class="hs-comment">-- number of value binders</span><span>
</span><span id="line-983"></span><span>
</span><span id="line-984"></span><span>    </span><span id="local-6989586621680835650"><span class="annot"><span class="annottext">old_info :: IdInfo
</span><a href="#local-6989586621680835650"><span class="hs-identifier hs-var hs-var">old_info</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680835657"><span class="hs-identifier hs-var">old_id</span></a></span><span>
</span><span id="line-985"></span><span>    </span><span id="local-6989586621680835649"><span class="annot"><span class="annottext">old_arity :: Int
</span><a href="#local-6989586621680835649"><span class="hs-identifier hs-var hs-var">old_arity</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Int
</span><a href="GHC.Types.Id.Info.html#arityInfo"><span class="hs-identifier hs-var">arityInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835650"><span class="hs-identifier hs-var">old_info</span></a></span><span>
</span><span id="line-986"></span><span>    </span><span id="local-6989586621680835648"><span class="annot"><span class="annottext">old_inline_prag :: InlinePragma
</span><a href="#local-6989586621680835648"><span class="hs-identifier hs-var hs-var">old_inline_prag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma
</span><a href="GHC.Types.Id.Info.html#inlinePragInfo"><span class="hs-identifier hs-var hs-var">inlinePragInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835650"><span class="hs-identifier hs-var">old_info</span></a></span><span>
</span><span id="line-987"></span><span>    </span><span id="local-6989586621680835647"><span class="annot"><span class="annottext">old_occ_info :: OccInfo
</span><a href="#local-6989586621680835647"><span class="hs-identifier hs-var hs-var">old_occ_info</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; OccInfo
</span><a href="GHC.Types.Id.Info.html#occInfo"><span class="hs-identifier hs-var hs-var">occInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835650"><span class="hs-identifier hs-var">old_info</span></a></span><span>
</span><span id="line-988"></span><span>    </span><span id="local-6989586621680835644"><span class="annot"><span class="annottext">new_arity :: Int
</span><a href="#local-6989586621680835644"><span class="hs-identifier hs-var hs-var">new_arity</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835649"><span class="hs-identifier hs-var">old_arity</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835653"><span class="hs-identifier hs-var">arity_increase</span></a></span><span>
</span><span id="line-989"></span><span>    </span><span id="local-6989586621680835642"><span class="annot"><span class="annottext">new_occ_info :: OccInfo
</span><a href="#local-6989586621680835642"><span class="hs-identifier hs-var hs-var">new_occ_info</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccInfo -&gt; OccInfo
</span><a href="GHC.Types.Basic.html#zapOccTailCallInfo"><span class="hs-identifier hs-var">zapOccTailCallInfo</span></a></span><span> </span><span class="annot"><span class="annottext">OccInfo
</span><a href="#local-6989586621680835647"><span class="hs-identifier hs-var">old_occ_info</span></a></span><span>
</span><span id="line-990"></span><span>
</span><span id="line-991"></span><span>    </span><span id="local-6989586621680835640"><span class="annot"><span class="annottext">old_strictness :: StrictSig
</span><a href="#local-6989586621680835640"><span class="hs-identifier hs-var hs-var">old_strictness</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig
</span><a href="GHC.Types.Id.Info.html#strictnessInfo"><span class="hs-identifier hs-var hs-var">strictnessInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835650"><span class="hs-identifier hs-var">old_info</span></a></span><span>
</span><span id="line-992"></span><span>    </span><span id="local-6989586621680835639"><span class="annot"><span class="annottext">new_strictness :: StrictSig
</span><a href="#local-6989586621680835639"><span class="hs-identifier hs-var hs-var">new_strictness</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; StrictSig -&gt; StrictSig
</span><a href="GHC.Types.Demand.html#prependArgsStrictSig"><span class="hs-identifier hs-var">prependArgsStrictSig</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835653"><span class="hs-identifier hs-var">arity_increase</span></a></span><span> </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680835640"><span class="hs-identifier hs-var">old_strictness</span></a></span><span>
</span><span id="line-993"></span><span>    </span><span id="local-6989586621680835637"><span class="annot"><span class="annottext">old_cpr :: CprSig
</span><a href="#local-6989586621680835637"><span class="hs-identifier hs-var hs-var">old_cpr</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig
</span><a href="GHC.Types.Id.Info.html#cprInfo"><span class="hs-identifier hs-var hs-var">cprInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835650"><span class="hs-identifier hs-var">old_info</span></a></span><span>
</span><span id="line-994"></span><span>
</span><span id="line-995"></span><span>    </span><span id="local-6989586621680835654"><span class="annot"><span class="annottext">transfer :: IdInfo -&gt; IdInfo
</span><a href="#local-6989586621680835654"><span class="hs-identifier hs-var hs-var">transfer</span></a></span></span><span> </span><span id="local-6989586621680835636"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835636"><span class="hs-identifier hs-var">new_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680835636"><span class="hs-identifier hs-var">new_info</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Int -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680835644"><span class="hs-identifier hs-var">new_arity</span></a></span><span>
</span><span id="line-996"></span><span>                                 </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680835648"><span class="hs-identifier hs-var">old_inline_prag</span></a></span><span>
</span><span id="line-997"></span><span>                                 </span><span class="annot"><span class="annottext">IdInfo -&gt; OccInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setOccInfo"><span class="hs-operator hs-var">`setOccInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">OccInfo
</span><a href="#local-6989586621680835642"><span class="hs-identifier hs-var">new_occ_info</span></a></span><span>
</span><span id="line-998"></span><span>                                 </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680835639"><span class="hs-identifier hs-var">new_strictness</span></a></span><span>
</span><span id="line-999"></span><span>                                 </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-operator hs-var">`setCprInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">CprSig
</span><a href="#local-6989586621680835637"><span class="hs-identifier hs-var">old_cpr</span></a></span><span>
</span><span id="line-1000"></span><span>
</span><span id="line-1001"></span><span class="annot"><a href="GHC.Types.Id.html#isNeverLevPolyId"><span class="hs-identifier hs-type">isNeverLevPolyId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1002"></span><span id="isNeverLevPolyId"><span class="annot"><span class="annottext">isNeverLevPolyId :: Id -&gt; Bool
</span><a href="GHC.Types.Id.html#isNeverLevPolyId"><span class="hs-identifier hs-var hs-var">isNeverLevPolyId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Bool
</span><a href="GHC.Types.Id.Info.html#isNeverLevPolyIdInfo"><span class="hs-identifier hs-var">isNeverLevPolyIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(IdInfo -&gt; Bool) -&gt; (Id -&gt; IdInfo) -&gt; Id -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span>
</span><span id="line-1003"></span></pre></body></html>